From 4ab365b110f2f1f2b736326b7059244a32115089 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:45:38 +0100 Subject: unslug de: move --- files/de/web/css/id_selectors/index.html | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 files/de/web/css/id_selectors/index.html (limited to 'files/de/web/css/id_selectors') 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 +--- +
{{CSSRef("Selectors")}}
+ +

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.

+ +

Syntax

+ +
#id_value { Stileigenschaften }
+ +

Beachte, dass dies äquivalent zu folgendem {{cssxref("Attributselektoren", "Attributselektor")}} ist:

+ +
[id=id_value] { Stileigenschaften }
+ +

Beispiel

+ +
span#identified {
+  background-color: DodgerBlue;
+}
+
+ +
<span id="identified">Hier ist ein Span mit Text.</span>
+<span>Hier ist ein weiterer.</span>
+
+ +

{{EmbedLiveSample("Beispiel", 200, 50)}}

+ +

Spezifikationen

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpezifikationStatusKommentar
{{SpecName("CSS4 Selectors", "#id-selectors", "ID selectors")}}{{Spec2("CSS4 Selectors")}} 
{{SpecName("CSS3 Selectors", "#id-selectors", "ID selectors")}}{{Spec2("CSS3 Selectors")}} 
{{SpecName("CSS2.1", "selector.html#id-selectors", "ID selectors")}}{{Spec2("CSS2.1")}} 
{{SpecName("CSS1", "#id-as-selector", "ID selectors")}}{{Spec2("CSS1")}}Ursprüngliche Definition
+ +

Browser Kompatibilität

+ +{{Compat("css.selectors.id")}} -- cgit v1.2.3-54-g00ecf