๐ฆ Changgo/๐ฃ EDOC
[CSS] Flexbox Froggy ํ๋ฉด์ CSS flexbox ๊ณต๋ถํ๊ธฐ
์ ๋ฌ
2021. 4. 29. 18:11
๋ฐ์ํ
1. justify-content
: ์์๋ค์ ๊ฐ๋ก์ ์์ ์ ๋ ฌ
justify-content : flex-start //์ผ์ชฝ์ผ๋ก ์ ๋ ฌ
justify-content : flex-end //์ค๋ฅธ์ชฝ์ผ๋ก ์ ๋ ฌ
justify-content : center //๊ฐ์ด๋ฐ ์ ๋ ฌ
justify-content : space-between //์์ ์ฌ์ด ๋์ผํ ๊ฐ๊ฒฉ
justify-content : space-around //์์ ์ฃผ์์ ๋์ผํ ๊ฐ๊ฒฉ
2. align-items
: ์์๋ค์ ์ธ๋ก์ ์์ ์ ๋ ฌ
align-items : flex-start //๊ผญ๋๊ธฐ์ ์ ๋ ฌ
align-items : flex-end //๋ฐ๋ฅ์ ์ ๋ ฌ
align-items : center //๊ฐ์ด๋ฐ ์ ๋ ฌ
align-items : baseline //์์์์น์ ์ ๋ ฌ
align-items : stretch //์ปจํ
์ด๋์ ๋ง๊ฒ ๋๋ฆฌ๊ธฐ
3. flex-direction
: ์์๋ค์ ์ ๋ ฌํ๋ ๋ฐฉํฅ์ ์ง์
flex-direction : row //๊ฐ๋ก๋ก ์ ๋ ฌ
flex-direction : row-reverse //๊ฐ๋ก๋ก ๊ฑฐ๊พธ๋ก
flex-direction : column //์ธ๋ก๋ก ์ ๋ ฌ
flex-direction : column //์ธ๋ก๋ก ๊ฑฐ๊พธ๋ก
4. order
: ์์์ ์์ ์ง์
.whkakrkr {
order : 3 //์ค๋ฅธ์ชฝ์ผ๋ก 3์นธ
order : -3 //์ผ์ชฝ์ผ๋ก 3์นธ
}
5. -self
: ํด๋น ์์์๋ง ์ํฅ์ ๋ฏธ์นจ
.whkakrkr {
align-self : flex-bottom //whkakrkr๋ง ์ธ๋ก๋ก ๋งจ ์ผ๋ ์ ๋ ฌ
}
6. flex-wrap
: ์์ ๋์ด ์ค ์ ์ค์
flex-wrap : nowrap //ํ์ค์ ์ ๋ ฌ
flex-wrap : wrap //์ฌ๋ฌ์ค์ ์ ๋ ฌ
flex-wrap : wrap-reverse //์ฌ๋ฌ์ค์ ๊ฑฐ๊พธ๋ก ์ ๋ ฌ
7. flex-flow
= flex-direction + flex-wrap
flex-flow : row-reverse wrap //์ฌ๋ฌ์ค์ ๊ฑธ์ณ ๊ฐ๋ก๋ก ๊ฑฐ๊พธ๋ก ์ ๋ ฌ
flex-flow : column nowrap //ํ์ค์ ์ธ๋ก๋ก ์ ๋ ฌ
8. align-contents
: ์ปจํ ์ด๋ ์ฌ์ด์ ๊ฐ๊ฒฉ (์ค)
align-content : flex-start //๊ผญ๋๊ธฐ์ ์ ๋ ฌ
align-content : flex-end //๋ฐ๋ฅ์ ์ ๋ ฌ
align-content : center //๊ฐ์ด๋ฐ ์ ๋ ฌ
align-content : space-between //์ค์ฌ์ด ๊ฐ์ ๊ฐ๊ฒฉ
align-content : space-around //์ค์ฌ์ด ๊ฐ์ ๊ฐ๊ฒฉ
align-content : stretch //์ฌ๋ฌ ์ค๋ค์ ์ปจํ
์ด๋์ ๋ง๊ฒ ๋๋ฆฌ๊ธฐ
๋ฐ์ํ