문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
wiki:css:css_note:css_flex_container [2021/07/05 16:56] emblim98 [Example] |
wiki:css:css_note:css_flex_container [2023/01/13 18:44] (현재) |
||
|---|---|---|---|
| 줄 340: | 줄 340: | ||
| {{: | {{: | ||
| - | ====Example==== | + | =====Example===== |
| <code css> | <code css> | ||
| 줄 1004: | 줄 1004: | ||
| </ | </ | ||
| </ | </ | ||
| - | ====align-content: | + | ===== Example ===== |
| - | '' | + | '' |
| + | {{: | ||
| <code css> | <code css> | ||
| - | .flex-container { | + | < |
| - | display: flex; | + | |
| - | height: 600px; | + | display: flex; |
| - | flex-wrap: wrap; | + | height: 600px; |
| - | align-content: | + | flex-wrap: wrap; |
| - | } | + | align-content: |
| + | | ||
| + | | ||
| + | |||
| + | .flex-container > div { | ||
| + | background-color: | ||
| + | width: 100px; | ||
| + | margin: 10px; | ||
| + | text-align: center; | ||
| + | line-height: | ||
| + | font-size: 30px; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | < | ||
| + | |||
| + | < | ||
| + | at the end of the container.</ | ||
| + | |||
| + | <div class=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | </ | ||
| </ | </ | ||
| - | \\ | + | =====Perfect Centering===== |
| - | ====Perfect Centering==== | + | |
| 하기의 예제들에서 아주 일반적인 스타일 문제인 완벽한 중앙 정렬 방안을 확인하겠습니다.\\ | 하기의 예제들에서 아주 일반적인 스타일 문제인 완벽한 중앙 정렬 방안을 확인하겠습니다.\\ | ||
| - | **SOLUTION:** 두 개의 '' | + | {{:wiki:css:css_note:perfect-centering.png? |
| - | < | + | |
| - | .flex-container { | + | |
| - | display: flex; | + | |
| - | height: 300px; | + | |
| - | justify-content: center; | + | |
| - | align-items: | + | |
| - | } | + | |
| - | </ | + | |
| \\ | \\ | ||
| - | =====All CSS Flexbox Container Properties===== | + | **SOLUTION: |
| + | <code css> | ||
| + | < | ||
| + | .flex-container { | ||
| + | display: flex; | ||
| + | justify-content: | ||
| + | align-items: | ||
| + | height: 300px; | ||
| + | background-color: | ||
| + | } | ||
| + | |||
| + | .flex-container > div { | ||
| + | background-color: | ||
| + | color: white; | ||
| + | width: 100px; | ||
| + | height: 100px; | ||
| + | } | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | |||
| + | < | ||
| + | |||
| + | <p>A container with both the justify-content and the align-items properties | ||
| + | set to < | ||
| + | |||
| + | <div class=" | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ======All CSS Flexbox Container Properties====== | ||
| ^ Property | ^ Property | ||
| | align-center | | align-center | ||
| | align-items | | align-items | ||
| - | | display | + | | display |
| | flex-direction | | flex-direction | ||
| | flex-flow | | flex-flow | ||