aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/css/display/index.html
blob: 559a1bf4a27460dad74a12a3392b00982ef66046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
title: display
slug: Web/CSS/display
tags:
  - CSS
  - CSS Display
  - CSS Property
  - Reference
  - display
translation_of: Web/CSS/display
---
<div>{{CSSRef}}</div>

<p class="summary"><strong><code>display</code></strong> <a href="/ko/docs/Web/CSS">CSS</a> 속성은 요소를 <a href="/ko/docs/Web/CSS/CSS_Flow_Layout">블록과 인라인</a> 요소 중 어느 쪽으로 처리할지와 함께, <a href="/ko/docs/Web/CSS/CSS_Flow_Layout">플로우</a>, <a href="/ko/docs/Web/CSS/CSS_Grid_Layout">그리드</a>, <a href="/ko/docs/Web/CSS/CSS_Flexible_Box_Layout">플렉스</a>처럼 자식 요소를 배치할 때 사용할 레이아웃을 설정합니다.</p>

<p class="summary"><code>display</code> 속성은, 형식적으로는 요소의 내부와 외부 디스플레이 유형을 설정합니다. 외부 디스플레이 유형은 플로우 레이아웃에 요소가 참여하는 방법을 나타내고, 내부 디스플레이 유형은 자식의 레이아웃 방식을 설정합니다. <code>display</code>의 일부 값은 자신만의 명세를 가지고 있습니다. 이 문서의 끝에서 찾을 수 있는 명세표를 참고하세요.</p>

<h2 id="구문">구문</h2>

<p><code>display</code> 속성은 키워드 값을 사용해 지정합니다. 키워드는 6개의 카테고리로 분류할 수 있습니다.</p>

<pre>.container {
  display: &lt;display-keyword&gt;;
}
</pre>

<h3 id="바깥쪽">바깥쪽</h3>

<dl>
 <dt>{{CSSxRef("&lt;display-outside&gt;")}}</dt>
 <dd>요소의 외부 디스플레이 유형을 설정하는 키워드입니다. 외부 디스플레이 유형은 플로우 레이아웃에서 요소 자신의 역할과 마찬가지입니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-outside", "Syntax")}}</p>

<h3 id="안쪽">안쪽</h3>

<dl>
 <dt>{{CSSxRef("&lt;display-inside&gt;")}}</dt>
 <dd>요소의 내부 디스플레이 유형을 설정하는 키워드입니다. 내부 디스플레이 유형은 대체 요소가 아닌 요소의 콘텐츠 서식과 배치 방법을 나타냅니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-inside", "Syntax")}}</p>

<h3 id="리스트_아이템">리스트 아이템</h3>

<dl>
 <dt>{{cssxref("&lt;display-listitem&gt;")}}</dt>
 <dd>요소가 콘텐츠 블록 박스를 생성하고, 리스트 아이템 인라인 박스를 분리합니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-listitem", "Syntax")}}</p>

<h3 id="내부적">내부적</h3>

<dl>
 <dt>{{cssxref("&lt;display-internal&gt;")}}</dt>
 <dd><code>table</code>, <code>ruby</code> 등 일부 레이아웃 모델은 복잡한 내부 구조를 가지며, 자식과 자손이 채워넣을 여러가지 역할을 지닙니다. 이 항목은 그런 특정 레이아웃 모드에서만 의미를 갖는 "내부적"인 값을 정의합니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-internal", "Syntax")}}</p>

<h3 id="박스">박스</h3>

<dl>
 <dt>{{CSSxRef("&lt;display-box&gt;")}}</dt>
 <dd>요소의 디스플레이 박스를 생성해야 하는지 지정합니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-box", "Syntax")}}</p>

<h3 id="레거시">레거시</h3>

<dl>
 <dt>{{CSSxRef("&lt;display-legacy&gt;")}}</dt>
 <dd>CSS 2는 <code>display</code> 속성에 단일 키워드만 사용했으므로, 같은 레이아웃 모드를 위해 블록 레벨과 인라인 레벨 키워드를 각각 필요로 했습니다.</dd>
</dl>

<p>{{page("/ko/docs/Web/CSS/display-legacy", "Syntax")}}</p>

<p>The Level 3 specification details two values for the <code>display</code> property — enabling the specification of the outer and inner display type explicitly — but this is not yet well-supported by browsers.</p>

<p>The display-legacy methods allow the same results with single keyword values, and should be favoured by developers until the two keyword values are better supported. For example, using two values you might specify an inline flex container as follows:</p>

<pre class="brush: css">.container {
  display: inline flex;
}</pre>

<p>This can currently be specified using a single value.</p>

<pre class="brush: css">.container {
  display: inline-flex;
}
</pre>

<h3 id="전역">전역</h3>

<pre class="brush: css">display: inherit;
display: initial;
display: unset;
</pre>

<h2 id="안내서_및_예제">안내서 및 예제</h2>

<p>The individual pages for the different types of value that <code>display</code> can have set on it feature multiple examples of those values in action — see the {{anch("Syntax")}} section. In addition, see the following material, which covers the various values of display in depth.</p>

<h3 id="CSS_Flow_Layout_display_block_display_inline">CSS Flow Layout (<code>display: block</code>, <code>display: inline</code>)</h3>

<ul>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Block_and_Inline_Layout_in_Normal_Flow">Block and Inline Layout in Normal Flow</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Flow_Layout_and_Overflow">Flow Layout and Overflow</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Flow_Layout_and_Writing_Modes">Flow Layout and Writing Modes</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Formatting_Contexts_Explained">Formatting Contexts Explained</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/In_Flow_and_Out_of_Flow">In Flow and Out of Flow</a></li>
</ul>

<h3 id="display_flex"><code>display: flex</code></h3>

<ul>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox">Basic concepts of flexbox</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Aligning_Items_in_a_Flex_Container">Aligning Items in a Flex Container</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Controlling_Ratios_of_Flex_Items_Along_the_Main_Ax">Controlling Ratios of Flex Items Along the Main Axis</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mixins">Cross-browser Flexbox mixins</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Mastering_Wrapping_of_Flex_Items">Mastering Wrapping of Flex Items</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Ordering_Flex_Items">Ordering Flex Items</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Relationship_of_Flexbox_to_Other_Layout_Methods">Relationship of flexbox to other layout methods</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Backwards_Compatibility_of_Flexbox">Backwards Compatibility of Flexbox</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Typical_Use_Cases_of_Flexbox">Typical use cases of Flexbox</a></li>
</ul>

<h3 id="display_grid"><code>display: grid</code></h3>

<ul>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout">Basic Concepts of Grid Layout</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout">Relationship to other layout methods</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Line-based_Placement_with_CSS_Grid">Line-based placement</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines">Layout using named grid lines</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout">Auto-placement in grid layout</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout">Box alignment in grid layout</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid,_Logical_Values_and_Writing_Modes">Grids, logical values and writing modes</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility">CSS Grid Layout and Accessibility</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement">CSS Grid Layout and Progressive Enhancement</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout">Realizing common layouts using grids</a></li>
</ul>

<h2 id="접근성_고려사항">접근성 고려사항</h2>

<h3 id="display_none"><code>display: none</code></h3>

<p>Using a <code>display</code> value of <code>none</code> on an element will remove it from the <a href="/en-US/docs/Learn/Accessibility/What_is_accessibility#Accessibility_APIs">accessibility tree</a>. This will cause the element and all its descendant elements to no longer be announced by screen reading technology.</p>

<p>If you want to visually hide the element, a more accessible alternative is to use <a class="external" href="https://gomakethings.com/hidden-content-for-better-a11y/#hiding-the-link">a combination of properties</a> to remove it visually from the screen but keep it parseable by assistive technology such as screen readers.</p>

<h3 id="display_contents"><code>display: contents</code></h3>

<p>Current implementations in most browsers will remove from the <a href="/en-US/docs/Learn/Accessibility/What_is_accessibility#Accessibility_APIs">accessibility tree</a> any element with a <code>display</code> value of <code>contents</code> (but descendants will remain). This will cause the element itself to no longer be announced by screen reading technology. This is incorrect behavior according to the <a href="https://drafts.csswg.org/css-display/#valdef-display-contents">CSS specification</a>.</p>

<ul>
 <li><a class="external" href="https://hiddedevries.nl/en/blog/2018-04-21-more-accessible-markup-with-display-contents">More accessible markup with display: contents | Hidde de Vries</a></li>
 <li><a class="external" href="http://adrianroselli.com/2018/05/display-contents-is-not-a-css-reset.html">Display: Contents Is Not a CSS Reset | Adrian Roselli</a></li>
</ul>

<h3 id="Tables">Tables</h3>

<p>Changing the <code>display</code> value of a {{HTMLElement("table")}} element to <code>block</code>, <code>grid</code>, or <code>flex</code> will alter its representation in the <a href="/en-US/docs/Learn/Accessibility/What_is_accessibility#Accessibility_APIs">accessibility tree</a>. This will cause the table to no longer be announced properly by screen reading technology.</p>

<ul>
 <li><a class="external" href="https://developer.paciellogroup.com/blog/2018/03/short-note-on-what-css-display-properties-do-to-table-semantics/">Short note on what CSS display properties do to table semantics — The Paciello Group</a></li>
 <li><a class="external" href="https://gomakethings.com/hidden-content-for-better-a11y/">Hidden content for better a11y | Go Make Things</a></li>
 <li><a href="/en-US/docs/Web/Accessibility/Understanding_WCAG/Perceivable#Guideline_1.3_%E2%80%94_Create_content_that_can_be_presented_in_different_ways">MDN Understanding WCAG, Guideline 1.3 explanations</a></li>
 <li><a class="external" href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/content-structure-separation-programmatic.html">Understanding Success Criterion 1.3.1 | W3C Understanding WCAG 2.0</a></li>
</ul>

<h2 id="Specifications" name="Specifications">명세</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Display', '#the-display-properties', 'display')}}</td>
   <td>{{Spec2('CSS3 Display')}}</td>
   <td>Added <code>run-in</code>, <code>flow</code>, <code>flow-root</code>, <code>contents</code>, and multi-keyword values.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Ruby', '#ruby-display', 'display')}}</td>
   <td>{{Spec2('CSS3 Ruby')}}</td>
   <td>Added <code>ruby</code>, <code>ruby-base</code>, <code>ruby-text</code>, <code>ruby-base-container</code>, and <code>ruby-text-container</code>.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Grid', '#grid-containers', 'display')}}</td>
   <td>{{Spec2('CSS3 Grid')}}</td>
   <td>Added the grid box model values.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Flexbox', '#flex-containers', 'display')}}</td>
   <td>{{Spec2('CSS3 Flexbox')}}</td>
   <td>Added the flexible box model values.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS2.1', 'visuren.html#display-prop', 'display')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>Added the table model values and <code>inline-block<em>.</em></code></td>
  </tr>
  <tr>
   <td>{{SpecName('CSS1', '#display', 'display')}}</td>
   <td>{{Spec2('CSS1')}}</td>
   <td>Initial definition. Basic values: <code>none</code>, <code>block</code>, <code>inline</code>, and <code>list-item</code>.</td>
  </tr>
 </tbody>
</table>

<p>{{cssinfo}}</p>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div class="hidden">The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div>

<p>{{Compat("css.properties.display", 10)}}</p>

<h2 id="같이_보기">같이 보기</h2>

<ul>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Block_and_Inline_Layout_in_Normal_Flow">Block and Inline Layout in Normal Flow</a></li>
 <li><a href="/en-US/docs/Web/CSS/CSS_Flow_Layout/Formatting_Contexts_Explained">Formatting contexts explained</a></li>
 <li>{{CSSxRef("visibility")}}, {{CSSxRef("float")}}, {{CSSxRef("position")}}</li>
 <li>{{CSSxRef("grid")}}, {{CSSxRef("flex")}}</li>
</ul>