๐Ÿ’ซ Flexbox ๋ ˆ์ด์•„์›ƒ ์‚ฌ์šฉ๋ฒ•

<div class="flex-container">
  <div class="box"></div>
  <div class="box"></div>
  <div class="box"></div>
</div>
.flex-container {
  display : flex;
}
.box {
  width : 100px;
  height : 100px;
  background : grey;
  margin : 5px;
}

๋ถ€๋ชจ ์š”์†Œ์—๊ฒŒ display : flex ์‚ฌ์šฉ
์„ธ๋กœ์ •๋ ฌ โ†’ ๊ฐ€๋กœ์ •๋ ฌ

๐Ÿ’ซ Flexbox ์„ธ๋ถ€์†์„ฑ ์‚ฌ์šฉํ•˜๊ธฐ

.flex-container {
  display : flex;
  justify-content : center;/* ์ขŒ์šฐ์ •๋ ฌ */
  align-items : center;/* ์ƒํ•˜์ •๋ ฌ */
  flex-direction : column;/* ์„ธ๋กœ์ •๋ ฌ */
  flex-wrap : wrap;/* ํญ์ด ๋„˜์น˜๋Š” ์š”์†Œ wrap ์ฒ˜๋ฆฌ */
}
.box {
  flex-grow : 2;/* ํญ์ด ์ƒ๋Œ€์ ์œผ๋กœ ๋ช‡๋ฐฐ์ธ์ง€ ๊ฒฐ์ • */
}

๐Ÿ’ซ align-content

justify-content์˜ ์„ธ๋กœ๋ฒ„์ „

๐Ÿ’ซ ์˜ค๋Š˜์˜ ์ˆ™์ œ : flexbox๋กœ nav ๋ฉ”๋‰ด ๋งŒ๋“ค์–ด๋ณด๊ธฐ

See the Pen
Untitled
by dozzs (@dozzs)
on CodePen.

By Dozzing

๋‹ต๊ธ€ ๋‚จ๊ธฐ๊ธฐ

์ด๋ฉ”์ผ ์ฃผ์†Œ๋Š” ๊ณต๊ฐœ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ํ•„์ˆ˜ ํ•„๋“œ๋Š” *๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค