flex-direction / flex-wrap

이희준·2022년 11월 11일
0

flex-direction

flex-direction: row;
// 기본값. 주축은 행이고 방향은 콘텐츠의 방향과 동일

flex-direction: row-reverse;
// 주축은 행이고 방향은 콘텐츠의 방향과 반대

flex-direction: column
// 주축은 열이고 방향은 콘텐츠의 방향과 동일

flex-direction: column-reverse
// 주축은 열이고 방향은 콘텐츠의 방향과 반대

flex-wrap

flex-wrap: nowrap;
// 기본값. 공간이 부족하더라도 요소를 한줄에 배치

flex-wrap: wrap;
// 공간 크기에 따라 요소가 여러 행에 걸쳐 배치

flex-wrap: wrap-reverse;
// wrap과 동일하나 요소 나열되는 시작점과 끝점이 반대

0개의 댓글