CSS Flex 210320 - ChoDragon9/posts GitHub Wiki

flex

기본적으둜 컨텐츠 기반의 κ°€λ‘œν­ 그리고 λΆ€λͺ¨ κΈ°μ€€μ˜ μ„Έλ‘œν­μ„ κ°€μ§€λŠ” λ ˆμ΄μ•„μ›ƒμ„ μ˜λ―Έν•œλ‹€.

flex ꡬ쑰

  • μ»¨ν…Œμ΄λ„ˆμ™€ μ•„μ΄ν…œμœΌλ‘œ λ‚˜λˆ μ§.
  • μ»¨ν…Œμ΄λ„ˆμ™€ μ•„μ΄ν…œμ— 적용 ν•  수 μžˆλŠ” 속성이 λ‹€λ₯΄λ‹€.

μ»¨ν…Œμ΄λ„ˆ

- display: flex | inline-flex
- flex-direction: row | column | row-reverse | column-reverse
- flex-wrap: nowrap | wrap | wrap-reverse
- flex-flow: <flex-direction> <flex-wrap>
- justify-content:
    flex-start | flex-end | center |
    space-between | space-around | space-evenly
- align-items: stretch | flex-start | flex-end | center | baseline
- align-content: // flex-wrap: wrap μ„€μ •λœ μƒνƒœμΌ λ•Œ μ‚¬μš©.
    stretch | flex-start | flex-end | center |
    space-between | space-around | space-evenly

μ•„μ΄ν…œ

// flex λ°•μŠ€μ˜ κΈ°λ³Έ 크기 μ„€μ •
- flex-basis: auto | λ‹¨μœ„(0 | 50% | 300px | 10rem) | content

// flex-basis 보닀 컀질 수 μžˆλŠ”μ§€ μ„€μ •
- flex-grow: 0 | 숫자

// flex-basis 보닀 μž‘μ•„μ§ˆ 수 μžˆλŠ”μ§€ μ„€μ •
- flex-shrink: 1 | 숫자

- flex: <flex-grow> <flex-shrink> <flex-basis>

// μˆ˜μ§μΆ• μ •λ ¬
- align-self: auto | stretch | flex-start | flex-end | center | baseline
- order: 숫자
⚠️ **GitHub.com Fallback** ⚠️