❗️ FOCUS ON CONCEPTS, NOT MEMORIZING THE PROPERTIES
display: flex; 포함한 셀렉터가 Flexbox container
X축: Main Axis / Y축: Cross Axis
flex-direction row; / row-reverse; / column; / column-reverse;
justify-content how the actual elements, content is distributed across the main axis
flex-wrap whether our elements are going to wrap along the main axis onto a new line if it’s horizontal, or a new column if it’s a vertical main axis
align-items distributes space or items along the cross axis
align-content 여러줄의 아이템을 정렬
align-self for single element
flex-basis: the initial size that an element should be added into the box as
flex-grow: the amount of available space an element should take up (accepts unit-less number, 무단위숫자 → 비율을 나타냄)
flex-shrink: if items are larger than the container, they shrink according to flex-shrink.
/* Three values: flex-grow | flex-shrink | flex-basis (whichever has units) */
flex: 2 2 10%
@media (min-width | max-width | orientation: landscape (가로모드) ...) {
h1 {
color: green;
}
}
chrome dev tool → 디바이스 변경 아이콘으로 디스플레이 미리보기 가능