aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/css/_colon_empty/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/de/web/css/_colon_empty/index.html')
-rw-r--r--files/de/web/css/_colon_empty/index.html66
1 files changed, 66 insertions, 0 deletions
diff --git a/files/de/web/css/_colon_empty/index.html b/files/de/web/css/_colon_empty/index.html
new file mode 100644
index 0000000000..ed47ba891a
--- /dev/null
+++ b/files/de/web/css/_colon_empty/index.html
@@ -0,0 +1,66 @@
+---
+title: ':empty'
+slug: 'Web/CSS/:empty'
+tags:
+ - CSS
+ - CSS Pseudoklasse
+ - Layout
+ - Referenz
+ - Web
+translation_of: 'Web/CSS/:empty'
+---
+<div>{{CSSRef}}</div>
+
+<h2 id="Übersicht">Übersicht</h2>
+
+<p>Der pseudo-Klassen Selektor <code>:empty</code> wählt Elemente aus, die über kein Kindelement verfügen. Ein Inhalt in Form von einem Text wird dabei ebenfalls als ein Kind des Elementes angesehen, Kommentare und sonstige Verarbeitungsanweisungen jedoch nicht.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">&lt;element&gt;:empty { /* Deklarationsblock */ }
+</pre>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<pre class="brush:css">span:empty::before {
+ background-color: lime;
+}
+</pre>
+
+<p>Die ersten beiden <code>span</code> Elemente sind leer, sodass der <code>:empty</code> Selektor angewendet wird. Auf die letzten drei trifft das jedoch nicht zu.</p>
+
+<pre class="brush:css">&lt;span&gt;&lt;/span&gt;
+&lt;span&gt;&lt;!-- Dieses Element wird grün dargestellt --&gt;&lt;/span&gt;
+
+&lt;span&gt; &lt;/span&gt;
+&lt;span&gt;Lorem ipsum&lt;/span&gt;
+&lt;span&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;
+</pre>
+
+<h2 id="Spezifikationen">Spezifikationen</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS4 Selectors', '#empty-pseudo', ':empty')}}</td>
+ <td>{{Spec2('CSS4 Selectors')}}</td>
+ <td>Keine Änderung</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Selectors', '#empty-pseudo', ':empty')}}</td>
+ <td>{{Spec2('CSS3 Selectors')}}</td>
+ <td>Ursprüngliche Definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2>
+
+{{Compat("css.selectors.empty")}}