aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/css/display/index.html
blob: d95d8fdf1702eb6ee38884d593d3f1d894dc473c (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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
---
title: display
slug: Web/CSS/display
tags:
  - CSS
  - CSS Eigenschaft
  - CSS Positionierung
  - NeedsMobileBrowserCompatibility
  - Referenz
translation_of: Web/CSS/display
---
<p>{{ CSSRef() }}</p>

<h2 id="Übersicht">Übersicht</h2>

<p>Die <code>display</code> Eigenschaft legt den Typ einer Rendering-Box eines Elements fest. Für HTML sind die standardmäßigen <code>display</code> Werte in der HTML-Spezifikation beschrieben und in den User- bzw. Browser-Stylesheets angegeben. Für XML-Dokumente ist der voreingestellte Wert <code>inline</code>.</p>

<p>Zusätzlich zu den vielen verschiedenen Anzeigearten erlaubt der Wert <code>none</code> es, ein Element gänzlich auszublenden; wenn none verwendet wird, werden auch alle Unterelemente ausgeblendet. Das Dokument wird so dargestellt, als ob das Element nicht im Dokumentenbaum existieren würde.</p>

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

<h2 id="Syntax">Syntax</h2>

<pre class="brush:css">/* Schlüsselwortwerte */
display: none;
display: inline;
display: block;
display: contents;
display: list-item;
display: inline-block;
display: inline-table;
display: table;
display: table-cell;
display: table-column;
display: table-column-group;
display: table-footer-group;
display: table-header-group;
display: table-row;
display: table-row-group;
display: flex;
display: inline-flex;
display: grid;
display: inline-grid;
display: ruby;
display: ruby-base;
display: ruby-text;
display: ruby-base-container;
display: ruby-text-container;
display: run-in;

/* Globale Werte */
display: inherit;
display: initial;
display: unset;
</pre>

<h2 id="Werte">Werte</h2>

<table class="standard-table">
 <thead>
  <tr>
   <td class="header" colspan="1">Modul</td>
   <td class="header">Wert</td>
   <td class="header">Beschreibung</td>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td colspan="1" rowspan="4">Basic values (CSS 1)</td>
   <td><code>none</code></td>
   <td>
    <p>Schaltet die Anzeige eines Elementes aus (das Element hat keinen Effekt mehr auf das Layout des Dokumentes). Alle Kindelemente werden ebenfalls nicht mehr angezeigt. Das Dokument wird so gerendert als wenn das Element nicht im Dokumentenbaum existieren würde.</p>

    <p>Um die Box trotzdem rendern zu lassen, aber den Inhalt unsichtbar zu machen, kann die {{cssxref("visibility")}} Eigenschaft verwendet werden.</p>
   </td>
  </tr>
  <tr>
   <td><code>inline</code></td>
   <td>Es werden eine oder mehrere inline Elementboxen generiert.</td>
  </tr>
  <tr>
   <td><code>block</code></td>
   <td>Es wird eine Blockbox generiert.</td>
  </tr>
  <tr>
   <td><code>list-item</code></td>
   <td>Es wird eine <code>block</code> Box für den Inhalt und eine separate <code>inline</code> Box für die List-Items generiert.</td>
  </tr>
  <tr>
   <td>Extended values (CSS 2.1)</td>
   <td><code>inline-block</code></td>
   <td>Es wird eine <code>block</code> Box generiert, welche den umliegenden Inhalt umfließen lässt, als wenn es eine einzelne <code>inline</code> Box wäre.</td>
  </tr>
  <tr>
   <td colspan="1" rowspan="10">Table model values (CSS 2.1)</td>
   <td><code>inline-table</code></td>
   <td>Verhält sich wie das {{HTMLElement("table")}} HTML Element, aber es wird ein <code>inline</code> Element generiert.</td>
  </tr>
  <tr>
   <td><code>table</code></td>
   <td>Verhält sich wie das {{HTMLElement("table")}} HTML Element. Es wird eine Blockbox generiert.</td>
  </tr>
  <tr>
   <td><code>table-caption</code></td>
   <td>Verhält sich wie das {{HTMLElement("caption")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-cell</code></td>
   <td>Verhält sich wie das {{HTMLElement("td")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-column</code></td>
   <td>Verhält sich wie das {{HTMLElement("col")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-column-group</code></td>
   <td>Verhält sich wie das {{HTMLElement("colgroup")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-footer-group</code></td>
   <td>Verhält sich wie das {{HTMLElement("tfoot")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-header-group</code></td>
   <td>Verhält sich wie das {{HTMLElement("thead")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-row</code></td>
   <td>Verhält sich wie das {{HTMLElement("tr")}} HTML Element</td>
  </tr>
  <tr>
   <td><code>table-row-group</code></td>
   <td>Verhält sich wie das {{HTMLElement("tbody")}} HTML Element</td>
  </tr>
  <tr>
   <td colspan="1" rowspan="2">Flexbox model values (<a href="/de/docs/CSS/CSS3" title="CSS3">CSS3</a>)</td>
   <td><code>flex</code></td>
   <td>Es wird ein Flexbox Container als <code>block </code>Element erzeugt.</td>
  </tr>
  <tr>
   <td><code>inline-flex</code></td>
   <td>Es wird ein Flexbox Container als <code>inline </code>Element erzeugt.</td>
  </tr>
  <tr>
   <td colspan="1" rowspan="2">Grid box model values (<a href="/de/docs/CSS/CSS3" title="CSS3">CSS3</a>) {{experimental_inline}}</td>
   <td><code>grid</code></td>
   <td>Es wird ein Grid Container als <code>block </code>Element erzeugt.
   </td>
  </tr>
  <tr>
   <td><code>inline-grid</code></td>
   <td>Es wird ein Grid Container als <code>inline</code> Element erzeugt.</td>
  </tr>
  <tr>
   <td colspan="1" rowspan="5">Ruby Formatierungsmodell Werte (<a href="/de/docs/Web/CSS/CSS3" title="CSS3">CSS3</a>){{experimental_inline}}</td>
   <td><code>ruby</code></td>
   <td>Das Element verhält sich wie ein Inlineelement und stellt seinen Inhalt anhand des Ruby Formatierungsmodells dar. Es verhält sich wie die entsprechenden {{HTMLElement("ruby")}} HTML Elemente.</td>
  </tr>
  <tr>
   <td><code>ruby-base</code></td>
   <td>Diese Elemente verhalten sich wie {{HTMLElement("rb")}} Elemente.</td>
  </tr>
  <tr>
   <td><code>ruby-text</code></td>
   <td>Diese Elemente verhalten sich wie {{HTMLElement("rt")}} Elemente.</td>
  </tr>
  <tr>
   <td><code>ruby-base-container</code></td>
   <td>Diese Elemente verhalten sich wie {{HTMLElement("rbc")}} Elemente, die als anonyme Boxen generiert wurden.</td>
  </tr>
  <tr>
   <td><code>ruby-text-container</code></td>
   <td>Diese Elemente verhalten sich wie {{HTMLElement("rtc")}} Elemente.</td>
  </tr>
  <tr>
   <td colspan="1" rowspan="2">Experimental values {{experimental_inline}}</td>
   <td><code>run-in</code></td>
   <td>
    <ul>
     <li>Wenn eine <code>run-in</code> Box eine <code>block</code> Box enthält, genau wie <code>block</code>.</li>
     <li>Wenn einer <code>block</code> Box eine <code>run-in</code> Box folgt, wird die <code>run-in</code> Box die erste <code>inline</code> Box der <code>block</code> Box.</li>
     <li>Wenn eine <code>inline</code> Box folgt, wird aus der <code>run-in</code> Box eine <code>block</code> Box.</li>
    </ul>
   </td>
  </tr>
  <tr>
   <td><code>contents</code></td>
   <td>Diese Elemente erzeugen selbst keine spezielle Box. Sie werden durch ihre Pseudobox und deren Kindboxen ersetzt.</td>
  </tr>
 </tbody>
</table>

<h3 id="Formale_Syntax">Formale Syntax</h3>

{{csssyntax}}

<h2 id="Beispiele">Beispiele</h2>

<p><a class="external" href="/samples/cssref/display.html" rel="external nofollow" title="https://developer.mozilla.org/samples/cssref/display.html">Live Beispiel</a></p>

<pre>p.secret  { display: none; }
&lt;p class="secret"&gt;invisible text&lt;/p&gt;
</pre>

<h2 id="Browser_Compatibility" name="Browser_Compatibility">Spezifikation</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Spezifikation</th>
   <th scope="col">Status</th>
   <th scope="col">Anmerkung</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS3 Display', '#display', 'display')}}</td>
   <td>{{Spec2('CSS3 Display')}}</td>
   <td><code>run-in</code> und <code>contents</code> Werte hinzugefügt</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Ruby', '#display', 'display')}}</td>
   <td>{{Spec2('CSS3 Ruby')}}</td>
   <td><code>ruby</code>, <code>ruby-base</code>, <code>ruby-text</code>, <code>ruby-base-container</code> und <code>ruby-text-container</code> Eigenschaften hinzugefügt</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Grid', '#grid-declaration0', 'display')}}</td>
   <td>{{Spec2('CSS3 Grid')}}</td>
   <td>Grid Box-Modell hinzugefügt</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Flexbox', '#flex-containers', 'display')}}</td>
   <td>{{Spec2('CSS3 Flexbox')}}</td>
   <td>Flexbox-Modell hinzugefügt</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS2.1', 'visuren.html#display-prop', 'display')}}</td>
   <td>{{Spec2('CSS2.1')}}</td>
   <td>Table-Model und <code>inline-block</code> hinzugefügt</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS1', '#display', 'display')}}</td>
   <td>{{Spec2('CSS1')}}</td>
   <td><code>none</code>, <code>block</code>, <code>inline</code> und <code>list-item</code> hinzugefügt</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2>

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

<h2 id="Siehe_auch">Siehe auch</h2>

<ul>
 <li>{{cssxref("visibility")}}, {{cssxref("float")}}, {{cssxref("position")}}</li>
 <li>{{cssxref("flex")}}</li>
</ul>