display : flex ;
display 속성 중 하나justify-content
justify-content: start;⭐
justify-content: center;
justify-content: end;
justify-content: flex-start;⭐
justify-content: flex-end;
justify-content: space-between; ⭐
justify-content: space-around; ⭐
(1) start
vs. flex-start
flex-direction : row-reverse;
와 같이 역방향을 주었을 때,flex-start
는 이를 인식하고, 역방향이 되지만start
를 주면 역방향을 준 것을 인식하지 못한다(2) space-between
vs. space-around
between은 맨 첫번째 요소와 맨 마지막 요소를 양 끝에 딱 붙이고, 가운데 요소들을 일정 간격으로 정렬시켜줌 (양 끝에 붙여준다는 게 포인트라고 생각)
around는 맨 첫번째 요소와 맨 마지막 요소를 양 끝에 딱 붙여주지는 않지만, 양 끝 간격은 서로 동일함
align-items
align-items: stretch; ⭐
align-items: center;
align-items: start;
align-items: end;
(1) stretch
align-content
align-items
와 동일하게 사용되며, 단지 cross-axis 축의 아이템들이 여러개일 때 사용align-self
align-items: flex-start;
라는 효과를 주었다고 했을 때, 이를 무시하고 원하는 다른 위치에 배치가 가능하다. 자식인 본인은 align-self: center;
라면, center에 배치됨flex-direciton
flex-direction: column;
flex-direction: column-reverse;
flex-direciton: row;
flex-direciton: row-reverse;
flex-wrap
flex-wrap: wrap;
flex-wrap: nowrap;
flex-wrap: wrap-reverse;
flex-flow
flex-direction
과 flex-wrap
이 합쳐졌다고 생각하면 됨flex-flow: row wrap;
flex-flow: row-reverse nowrap;
flex-flow: column wrap-reverse;
flex-flow: column wrap;
(1) 초록색 미니박스를 파란박스의 중앙오른쪽에 위치시키기
justify-content:flex-end;
를 item클래스에다가 주고있었던 것😅.container {
display: flex; ⭐
width: 200px;
height: 200px;
background: blue;
justify-content: flex-end; ⭐
align-items: center;
}
.item {
display: flex; ⭐
width: 50px;
height: 50px;
background: green;
}
(2) flexbox froggy
flex
가 이해도 잘되고 좋았다. 완전히 익혀질 때까지 해야겠다. 재미있어서 쉬는시간에 하기 좋다!flex-basis
, flex-grow
, flex-shrink
도 복습 후 추가하기grid
는 실습한 내용과 함께 내일까지 업로드할 것