반응형

지난 시간에 margin 과 padding 으로 객체를 정렬하는 방법을 포스팅 했었는데

display: flex; 기능을 이용해 객체들을 손쉽게 정렬할 수 있다.

display: flex;
flex-direction: column;
align-items: center;
justify-content: center;

flex-direction 의 경우 column 과 row 가 있는데 column 는 객체들을 세로로 나열, row 는 가로로 나열하기 이다.

참 편한 기능인 듯 하다.

 

반응형

+ Recent posts