๋ณธ๋ฌธ์œผ๋กœ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์‚ฌ์šฉ์˜ˆ์‹œ

.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] 

 

๊ต์ฐจ์ถ•์ด column์ด๋‹ˆ๊นŒ, ์„ธ๋กœ ์ถ•์„ ์œ ์‹ฌํžˆ ๋ณผ ๊ฒƒ

 

3. align-content

: flex item์˜ ‘์—ฌ๋Ÿฌ ์ค„ ๊ต์ฐจ ์ถ• ์ •๋ ฌ๊ณผ ๊ฐ„๊ฒฉ์„ ์ œ์–ดํ•œ๋‹ค.

align-items์™€ ๊ฐ™์€ property์™€ "space -xxx" ์†์„ฑ์„ ๊ฐ–๋Š”๋‹ค.

๋ฐ˜์‘ํ˜•