9609c04755
W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더). - Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외) - Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체) - Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속) 각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
121 lines
4.9 KiB
Markdown
121 lines
4.9 KiB
Markdown
---
|
|
id: css-flexbox-intro
|
|
title: "CSS Flexbox Intro"
|
|
category: "Frontend"
|
|
status: "draft"
|
|
verification_status: "conceptual"
|
|
canonical_id: ""
|
|
aliases: ["Flexbox", "Flexible Box Layout", "display flex", "flex container flex items", "CSS flex layout"]
|
|
duplicate_of: ""
|
|
source_trust_level: "B"
|
|
confidence_score: 0.88
|
|
created_at: 2026-06-23
|
|
updated_at: 2026-06-23
|
|
review_reason: ""
|
|
merge_history: []
|
|
tags: ["css", "web", "frontend", "w3schools", "flexbox", "layout"]
|
|
raw_sources: ["https://www.w3schools.com/css/css3_flexbox.asp"]
|
|
applied_in: []
|
|
github_commit: ""
|
|
---
|
|
|
|
# [[CSS Flexbox Intro]]
|
|
|
|
## 🎯 한 줄 통찰 (One-line insight)
|
|
CSS Flexbox (the Flexible Box Layout module) is a one-dimensional layout model that arranges items horizontally or vertically inside a flex container in a flexible, responsive way. [S1]
|
|
|
|
## 🧠 핵심 개념 (Core concepts)
|
|
- **What it is** — CSS Flexbox is short for the CSS Flexible Box Layout module; it is a layout model for arranging items (horizontally or vertically) within a container, in a flexible and responsive way. [S1]
|
|
- **Flex container** — the parent element, made a flex container with `display: flex` (or `inline-flex`). [S1]
|
|
- **Flex items** — the direct children of the container automatically become flex items. [S1]
|
|
- **One- vs two-dimensional** — CSS Flexbox is used for a one-dimensional layout, with rows OR columns; CSS Grid is used for a two-dimensional layout, with rows AND columns. [S1]
|
|
|
|
## 🧩 추출된 패턴 (Extracted patterns)
|
|
- **Container/item pattern** — declare `display: flex` on a parent; its direct children become arrangeable flex items automatically. [S1]
|
|
- **One-dimensional choice** — reach for flexbox when laying out along a single axis (a row OR a column); reach for Grid for two-axis layouts. [S1]
|
|
|
|
## 📖 세부 내용 (Details)
|
|
CSS Flexbox is short for the CSS Flexible Box Layout module. Flexbox is a layout model for arranging items (horizontally or vertically) within a container, in a flexible and responsive way. [S1]
|
|
|
|
Flexbox consists of: [S1]
|
|
- **A Flex Container** — the parent element with `display: flex` or `inline-flex`. [S1]
|
|
- **Flex Items** — the direct children that automatically become flex items. [S1]
|
|
|
|
**Flexbox vs Grid:** CSS Flexbox is used for a one-dimensional layout, with rows OR columns. CSS Grid is used for a two-dimensional layout, with rows AND columns. [S1]
|
|
|
|
**Example — a basic flex container with three items** [S1]
|
|
```html
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.container {
|
|
display: flex;
|
|
background-color: DodgerBlue;
|
|
}
|
|
|
|
.container div {
|
|
background-color: #f1f1f1;
|
|
margin: 10px;
|
|
padding: 20px;
|
|
font-size: 30px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="container">
|
|
<div>Item 1</div>
|
|
<div>Item 2</div>
|
|
<div>Item 3</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
```
|
|
|
|
**CSS Flexbox properties / browser-support table:** Not found in source (a property reference table was not present in the fetched content for this intro page; the source links forward to the Flex Container, Flex Items, and Flex Responsive pages). [S1]
|
|
|
|
## 🛠️ 적용 사례 (Applied in summary)
|
|
The page's applied example is a `.container` set to `display: flex` with a DodgerBlue background holding three styled `div` children ("Item 1", "Item 2", "Item 3"), which render in a horizontal row. No external project/commit applications found in the source.
|
|
|
|
## 💻 코드 패턴 (Code patterns)
|
|
Make an element a flex container (language: CSS):
|
|
```css
|
|
.container {
|
|
display: flex;
|
|
}
|
|
```
|
|
Container with three items (language: HTML):
|
|
```html
|
|
<div class="container">
|
|
<div>Item 1</div>
|
|
<div>Item 2</div>
|
|
<div>Item 3</div>
|
|
</div>
|
|
```
|
|
|
|
## ⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
|
|
- **Flexbox** — one-dimensional layout (rows OR columns). Choose it for arranging items along a single axis flexibly and responsively. [S1]
|
|
- **CSS Grid** — two-dimensional layout (rows AND columns). Choose it when you need to control both axes simultaneously. [S1]
|
|
|
|
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
|
No contradictions found in the source.
|
|
|
|
## ✅ 검증 상태 및 신뢰도
|
|
- **상태:** draft
|
|
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
|
|
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
|
- **신뢰 점수:** 0.88
|
|
- **중복 검사 결과:** 신규 생성 (New discovery)
|
|
|
|
## 🔗 지식 그래프 (Knowledge Graph)
|
|
- **상위/루트:** [[CSS Tutorial]]
|
|
- **관련 개념:** [[CSS Flex Container]], [[CSS Flex Items]], [[CSS Grid]], [[CSS Media Queries]]
|
|
- **참조 맥락:** The entry point for single-axis flexible layouts; precedes the Flex Container and Flex Items detail pages.
|
|
|
|
## 📚 출처 (Sources)
|
|
- [S1] W3Schools — CSS Flexbox Intro — https://www.w3schools.com/css/css3_flexbox.asp
|
|
|
|
## 📝 변경 이력 (Change history)
|
|
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Flexbox Intro" page (Astra wiki-curation, P-Reinforce v3.1 format).
|