align-items / align-self / align-content

이희준·2022년 11월 11일
0

align-items

align-items: stretch
// flew-item이 교차축 길이에 맞춰 늘어남. But 너비 or 높이가 우선
lign-items: stretch
/ flew-item이 교차축 길이에 맞춰 늘어남. But 너비 or 높이가 우선
align-items: flex-start
// 교차축의 시작점으로부터 끝점을 향해 배치
align-items: flex-end
// 교차축의 끝점으로부터 시작점을 향해 배치
align-items: center
// 교차축의 중심부에 배치

align-self

align-self: stretch
// flew-item이 교차축 길이에 맞춰 늘어남. But 너비 or 높이가 우선
align-self: flex-start
// 교차축의 시작점으로부터 끝점을 향해 배치
align-self: flex-end
// 교차축의 끝점으로부터 시작점을 향해 배치
align-self: center
// 교차축의 중심부에 배치

align-content

  • 교차축 위에서 justify-content와 동일하게 사용할 수 있는 속성입니다.
  • 다음 두 조건이 만족되면서 여유 공간이 있을 때만 동작할 수 있습니다.
  1. flex-wrap의 값이 wrap으로 지정되어 있을 때
  2. 아이템을 배치하기 위해 필요한 공간보다 flex-container가 더 클 때

0개의 댓글