์ฌ์ฉ์์
.container {
display: flex;
justify-content: center;
align-items: flex-start;
align-contents: center;
}
1. justify-content
: ๋ฉ์ธ ์ถ ์ ๋ ฌ๊ณผ ์์ดํ ์ฌ์ด์ ๊ฐ๊ฒฉ์ ์ ์ดํ๋ค.
justify-content:
1) flex-start [default]
2) flex-end
3) center
4) space-between
5) space-around
6) space-evenly
flex-direction(๋ฉ์ธ์ถ ์ค์ ): row | row-reverse | column | column-reverse

2. align-items
: flex item์ ‘๊ต์ฐจ ์ถ’ ์ ๋ ฌ์ ์ ์ดํ๋ค.
align-items:
1) flex-start
2) flex-end
3) center
4) baseline
5) stretch [default]

3. align-content
: flex item์ ‘์ฌ๋ฌ ์ค ๊ต์ฐจ ์ถ’ ์ ๋ ฌ๊ณผ ๊ฐ๊ฒฉ์ ์ ์ดํ๋ค.
align-items์ ๊ฐ์ property์ "space -xxx" ์์ฑ์ ๊ฐ๋๋ค.

๋ฐ์ํ
'๐ Front > โจ CSS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [CSS] ๋ง์ง ์์ (Margin collapsing) ํ์ ์ดํดํ๊ธฐ (0) | 2022.04.19 |
|---|---|
| ๋ชจ๋ฐ์ผ์์ CSS hover ์ ์ฉํ ๋ ํจ๊ณผ๊ฐ ์ง์๋๋ ๋ฌธ์ ํด๊ฒฐ! (0) | 2021.05.10 |
| BEM์ CSSํ๊ธฐ๋ฒ (0) | 2021.05.03 |