🔸flex-direction

🔰 CSSLayoutFlexbox

  • flex-direction defines the main axis. ( 👉🏻 wrap-reverse: will reverse cross axis❗️)

當我們使用 flex-direction: row-reverse 時,雖然 main axis 方向改為「向左」,但 cross axis 的方依然向下」,並沒有因為我們使用 row-reverse 而改為「向上」。

⭐️ Notice: when flex-direction set to row-reverse or column-reverse, flex-start and flex-end are also reversed❗️

short-hand:

flex-fow:  «flex-direction»  «flex-wrap»

flex-direction values

flex-direction

values

row

row-reverse

⭐️ Notice: when flex-direction set to row-reverse or column-reverse, flex-start and flex-end are also reversed❗️

column

column-reverse

⭐️ Notice: when flex-direction set to row-reverse or column-reverse, flex-start and flex-end are also reversed❗️

Last updated