[flex-box] flex-direction & flex-wrap

๐Ÿ“„ flex-direction & flex-wrap

ํ”Œ๋ ‰์Šค๋ฐ•์Šค๋Š” ํ–‰ ๋˜๋Š” ์—ด์„ ์ฃผ์ถ•์œผ๋กœ ์„ค์ •ํ•˜์—ฌ ์›น ์š”์†Œ๋ฅผ ๋ฐฐ์น˜ ๋ฐ ์ •๋ ฌํ•˜๋Š” 1์ฐจ์› ๋ ˆ์ด์•„์›ƒ ๋ฐฉ์‹

๐Ÿ“„ flex-direction

ํ”Œ๋ ‰์Šค ์ปจํ…Œ์ด๋„ˆ์˜ ์ฃผ์ถ•์„ ๊ฒฐ์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

flex-direction: row; /*ํ”Œ๋ ‰์Šค์˜ ์ง„ํ–‰๋ฐฉํ–ฅ์ด ๊ฐ€๋กœ์ถ•์ด๋‹ค.*/
flex-direction: row-reverse; /*ํ”Œ๋ ‰์Šค์˜ ์ง„ํ–‰๋ฐฉํ–ฅ์ด ๊ฐ€๋กœ์ถ• ๋ฐ˜๋Œ€๋ฐฉํ–ฅ์ด๋‹ค.*/
flex-direction: column; /*ํ”Œ๋ ‰์Šค์˜ ์ง„ํ–‰๋ฐฉํ–ฅ์ด ์„ธ๋กœ์ถ•์ด๋‹ค.*/
flex-direction: column-reverse; /*ํ”Œ๋ ‰์Šค์˜ ์ง„ํ–‰๋ฐฉํ–ฅ์ด ์„ธ๋กœ์ถ• ๋ฐ˜๋Œ€๋ฐฉํ–ฅ์ด๋‹ค.*/

๐Ÿ“„ flex-wrap

ํ”Œ๋ ‰์Šค ์•„์ดํ…œ๋“ค์ด ๊ฐ•์ œ๋กœ ํ•œ์ค„์— ๋ฐฐ์น˜๋˜๊ฒŒ ํ•  ๊ฒƒ์ธ์ง€,
๋˜๋Š” ๊ฐ€๋Šฅํ•œ ์˜์—ญ ๋‚ด์—์„œ ๋ฒ—์–ด๋‚˜์ง€ ์•Š๊ณ  ์—ฌ๋Ÿฌํ–‰์œผ๋กœ ๋‚˜๋ˆ„์–ด ํ‘œํ˜„ ํ•  ๊ฒƒ์ธ์ง€ ๊ฒฐ์ •ํ•˜๋Š” ์†์„ฑ์ž…๋‹ˆ๋‹ค.

flex-wrap: nowrap; /*๊ธฐ๋ณธ๊ฐ’: ๋ฐ˜๋“œ์‹œ ํ•œ์ค„๋กœ ๋ฐฐ์น˜๋œ๋‹ค.*/
flex-wrap: wrap; /*ํ”Œ๋ ‰์Šค ์ปจํ…Œ์ด๋„ˆ์˜ ์˜์—ญ์ด ์ข์•„์ง์— ๋”ฐ๋ผ ํ”Œ๋ ‰์Šค ์•„์ดํ…œ์ด ์ƒˆ๋กœ์šด ํ–‰์œผ๋กœ ํ˜•์„ฑ๋œ๋‹ค.*/
flex-wrap: wrap-reverse; /* ์—ญ์ˆœ์œผ๋กœ wrap์ด ๋œ๋‹ค.*/

๐Ÿ“„ flex-flow

wrap์†์„ฑ์„ ํ•œ๋ฒˆ์— ์—ฌ๋Ÿฌ๊ฐœ ์ง€์ •ํ•  ์ˆ˜ ์žˆ๋Š” ๋‹จ์ถ• ์†์„ฑ์ž…๋‹ˆ๋‹ค.

flex-flow: row-reverse wrap;

์ถœ์ฒ˜

  • ์œ ๋…ธ์ฝ”๋”ฉ

Leave a comment