diff options
author | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:38 +0100 |
---|---|---|
committer | Florian Merz <me@fiji-flo.de> | 2021-02-11 14:45:38 +0100 |
commit | 4ab365b110f2f1f2b736326b7059244a32115089 (patch) | |
tree | c3c7c0219f728ade49a78c238c51cc0c8d06ebd6 /files/de/web/css/id_selectors | |
parent | 8260a606c143e6b55a467edf017a56bdcd6cba7e (diff) | |
download | translated-content-4ab365b110f2f1f2b736326b7059244a32115089.tar.gz translated-content-4ab365b110f2f1f2b736326b7059244a32115089.tar.bz2 translated-content-4ab365b110f2f1f2b736326b7059244a32115089.zip |
unslug de: move
Diffstat (limited to 'files/de/web/css/id_selectors')
-rw-r--r-- | files/de/web/css/id_selectors/index.html | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/files/de/web/css/id_selectors/index.html b/files/de/web/css/id_selectors/index.html new file mode 100644 index 0000000000..921e391d80 --- /dev/null +++ b/files/de/web/css/id_selectors/index.html @@ -0,0 +1,72 @@ +--- +title: ID-Selektoren +slug: Web/CSS/ID-Selektoren +tags: + - CSS + - CSS Referenz + - Einsteiger + - Selektoren +translation_of: Web/CSS/ID_selectors +--- +<div>{{CSSRef("Selectors")}}</div> + +<p>In einem HTML Dokument matchen CSS ID-Selektoren ein Element basierend auf den Inhalten des {{htmlattrxref("id")}} Attributs des Elements, welches exakt dem Wert des angegebenen Selektors entsprechen muss.</p> + +<h2 id="Syntax">Syntax</h2> + +<pre class="syntaxbox">#id_value { <em>Stileigenschaften</em> }</pre> + +<p>Beachte, dass dies äquivalent zu folgendem {{cssxref("Attributselektoren", "Attributselektor")}} ist:</p> + +<pre class="syntaxbox">[id=id_value] { <em>Stileigenschaften</em> }</pre> + +<h2 id="Beispiel">Beispiel</h2> + +<pre class="brush: css">span#identified { + background-color: DodgerBlue; +} +</pre> + +<pre class="brush: html"><span id="identified">Hier ist ein Span mit Text.</span> +<span>Hier ist ein weiterer.</span> +</pre> + +<p>{{EmbedLiveSample("Beispiel", 200, 50)}}</p> + +<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", "#id-selectors", "ID selectors")}}</td> + <td>{{Spec2("CSS4 Selectors")}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName("CSS3 Selectors", "#id-selectors", "ID selectors")}}</td> + <td>{{Spec2("CSS3 Selectors")}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName("CSS2.1", "selector.html#id-selectors", "ID selectors")}}</td> + <td>{{Spec2("CSS2.1")}}</td> + <td> </td> + </tr> + <tr> + <td>{{SpecName("CSS1", "#id-as-selector", "ID selectors")}}</td> + <td>{{Spec2("CSS1")}}</td> + <td>Ursprüngliche Definition</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_Kompatibilität">Browser Kompatibilität</h2> + +{{Compat("css.selectors.id")}} |