flexbox
HTML
<div class="box">
<div>One</div>
<div>Two</div>
<div>Three
<br>has
<br>extra
<br>text
</div>
</div>
CSS
.box {
display: flex;
}
flex-direction 지정
- row
- row-reverse
- column
- column-reverse
|
|
![]() |
![]() |
|
|
![]() |
![]() |
flex-wrap을 이용한 복수 행 flex 컨테이너 지정
항목이 여러 행에 나열 | flex-wrap: wrap;![]() |
flex 항목들은 컨테이너의 폭에 맞게 | flex-wrap: nowrap ;![]() |
flex-flow
- flex-direction 속성과 flex-wrap 속성을 합침
- 첫 번째 값은 flex-direction이고 두 번째 값은 flex-wrap
flex-flow: row wrap; | ![]() |
flex-flow: row-reverse wrap; | ![]() |
flex-flow: row nowrap; | ![]() |
flex-flow: row-reverse nowrap; | ![]() |
flex-flow: column wrap; | ![]() |
flex-flow: column-reverse wrap; | ![]() |
<자료출처>
https://developer.mozilla.org/ko/docs/Web/CSS/CSS_flexible_box_layout/Basic_concepts_of_flexbox
flexbox의 기본 개념 - CSS: Cascading Style Sheets | MDN
일명 flexbox라 불리는 Flexible Box module은 flexbox 인터페이스 내의 아이템 간 공간 배분과 강력한 정렬 기능을 제공하기 위한 1차원 레이아웃 모델 로 설계되었습니다. 이 글에서는 flexbox의 주요 기능
developer.mozilla.org
https://developer.mozilla.org/ko/docs/Web/CSS/flex
flex - CSS: Cascading Style Sheets | MDN
flex CSS 속성은 하나의 플렉스 아이템이 자신의 컨테이너가 차지하는 공간에 맞추기 위해 크기를 키우거나 줄이는 방법을 설정하는 속성입니다. flex는 flex-grow, flex-shrink, flex-basis의 단축 속성입니
developer.mozilla.org
https://www.w3schools.com/css/css3_flexbox.asp
W3Schools.com
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com