CSS_part1.3_Column and row

Eugenius1st·2022년 1월 16일
0

CSS

목록 보기
4/46

Column and row

flex-direction : row 인 경우

main axis = horizontal axis
따라서 수평축 위치를 조정하고 싶을때
justify-content 사용
따라서 수직축 위치를 조정하고 싶을때
align item 사용

flex-direction : column 인 경우

main axis = vertical axis
따라서 수직축 위치를 조정하고 싶을때
justify-content 사용
따라서 수평축 위치를 조정하고 싶을때
align item 사용

flex-direction 이 어디든 간에, justify content는 main axis, align item은 cross axis이다.

만약 flex-direction 에 따라 main axis 나 cross axis 방향으로 변경하고 싶을 다면 height를 설정해 주어야 한다. center가 없기 때문이다.

profile
최강 프론트엔드 개발자가 되고싶은 안유진 입니다

0개의 댓글