문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
wiki:css [2022/10/11 19:46] dhan |
wiki:css [2023/01/13 18:44] (현재) |
||
|---|---|---|---|
| 줄 44: | 줄 44: | ||
| background: beige; | background: beige; | ||
| height: 100vh; /* viewport height */ | height: 100vh; /* viewport height */ | ||
| + | display: flex; | ||
| + | flex-direction: | ||
| + | row: 왼쪽에서 오른쪽으로 | ||
| + | row-reverse; | ||
| + | column: 위에서 아래로 | ||
| + | column-reverse: | ||
| + | flex-wrap: nowrap; 디폴트, | ||
| + | wrap | ||
| + | wrap-reverse | ||
| + | /* flex-flow: column nowrap */ flex-direction, | ||
| + | justify-content: | ||
| + | flex-start: | ||
| + | flex-end: | ||
| + | center | ||
| + | space-around, | ||
| + | align-items: | ||
| + | align-content: | ||
| + | | ||
| + | | ||
| + | } | ||
| + | |||
| + | .item { | ||
| + | width: 40px; | ||
| + | height: 40px; | ||
| + | border: 1px solid black; | ||
| + | } | ||
| + | |||
| + | iterm 속성 | ||
| + | .item1 { | ||
| + | backtround: #ef9a9a; | ||
| + | flex-grow: 2; /* 늘어나는 비중 */ | ||
| + | flex-shrink: | ||
| + | flex-basis: 60%; /* 차지하는 비중, flex-grow, flxe-shrink와 같이 사용하지 않음 */ | ||
| + | align-self: center; /* 아이템별로 지정 */ | ||
| + | } | ||
| + | | ||
| + | .item2 { | ||
| + | backtround: #ef9a9a; | ||
| + | flex-grow: 1; | ||
| + | flex-shrink: | ||
| + | flex-basis: 60%; | ||
| + | } | ||
| + | |||
| + | .item3 { | ||
| + | backtround: #ef9a9a; | ||
| + | flex-grow: 1; | ||
| + | flex-shrink: | ||
| + | flex-basis: 60%; | ||
| + | } | ||
| + | | ||
| </ | </ | ||
| + | |||
| 실습 [[https:// | 실습 [[https:// | ||
| - | 컬러 [[https:// | + | 컬러 [[https:// |
| + | [[https:// | ||
| + | \\ | ||
| ===== Grid ===== | ===== Grid ===== | ||
| <code txt> | <code txt> | ||
| 줄 326: | 줄 379: | ||
| ===== CSS Note ==== | ===== CSS Note ==== | ||
| * [[wiki: | * [[wiki: | ||
| + | * [[https:// | ||
| \\ | \\ | ||
| {{tag> | {{tag> | ||