css
[css] Flexbox ์ฌ์ฉ <ul><li></li></ul> ๋ค๋ชจ๋ฐ์ค ์ธ๋ก์ ๋ ฌ
natrue
2021. 11. 19. 13:39
728x90

* display: flex; align-content: flex-start; flex-direction: column; flex-wrap: wrap
flex-wrap
flex-wrap property๋ flex-item ์์๋ค์ด ๊ฐ์ ๋ก ํ์ค์ ๋ฐฐ์น๋๊ฒ ํ ๊ฒ์ธ์ง, ๋๋ ๊ฐ๋ฅํ ์์ญ ๋ด์์ ๋ฒ์ด๋์ง ์๊ณ ์ฌ๋ฌํ์ผ๋ก ๋๋์ด ํํ ํ ๊ฒ์ธ์ง ๊ฒฐ์ ํ๋ ์์ฑ์ด๋ค. ๋ง์ฝ ์์ญ ๋ด์์ ๋ฒ์ด๋์ง ๋ชปํ๊ฒ ์ค์ ํ๋ค๋ฉด, ๋์์ ์์์ ๋ฐฉํฅ ์ถ์ ๊ฒฐ์ ํ ์ ์๋ค.
ul : ๋ถ๋ชจ ์๋ฆฌ๋จผํธ - display: flex๋ฅผ ์ค์ ํ ๋ถ๋ชจ ์๋ฆฌ๋จผํธ
li : ์์ ์๋ฆฌ๋จผํธ - Flex container ๋ด์ ์์ ์๋ฆฌ๋จผํธ
.divUl{display: flex; align-content: flex-start; flex-direction: column; flex-wrap: wrap}
.divUl li{border: 1px solid gold; list-style: none; margin-bottom:10px; padding: 30px;color: red; background-color: #fff8b6;}
<ul class="divUl">
<li></li>
<li></li>
<li></li>
</ul>
