From 4b1a9203c547c019fc5398082ae19a3f3d4c3efe Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:15 -0500 Subject: initial commit --- files/de/web/css/_colon_focus/index.html | 79 ++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 files/de/web/css/_colon_focus/index.html (limited to 'files/de/web/css/_colon_focus/index.html') diff --git a/files/de/web/css/_colon_focus/index.html b/files/de/web/css/_colon_focus/index.html new file mode 100644 index 0000000000..6d0fb0aac5 --- /dev/null +++ b/files/de/web/css/_colon_focus/index.html @@ -0,0 +1,79 @@ +--- +title: ':focus' +slug: 'Web/CSS/:focus' +tags: + - CSS + - CSS Pseudoklasse + - Layout + - Referenz + - Selektoren + - Web +translation_of: 'Web/CSS/:focus' +--- +
{{CSSRef}}
+ +

Übersicht

+ +

Die CSS Pseudoklasse :focus steht für Elemente, welche mit einem Eingabegerät, wie z. B. der Tastatur, fokusiert wurden.

+ +

Syntax

+ +
element:focus { ... }
+ +

Beispiele

+ +
.first-name:focus {
+  color: red;
+}
+
+.last-name:focus {
+  color: lime;
+}
+ +
<input class="first-name" value="Dieser Text wird rot, wenn das Textfeld den Fokus erhält">
+<input class="last-name" value="Dieser Text wird grün, wenn das Textfeld den Fokus erhält">
+ +

{{EmbedLiveSample('Beispiele', '100%', 40)}}

+ +

Spezifikationen

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpezifikationStatusKommentar
{{SpecName('CSS4 Selectors', '#focus-pseudo', ':focus')}}{{Spec2('CSS4 Selectors')}}Keine Änderung
{{SpecName('CSS3 Selectors', '#the-user-action-pseudo-classes-hover-act', ':focus')}}{{Spec2('CSS3 Selectors')}}Keine Änderung
{{SpecName('CSS2.1', 'selector.html#dynamic-pseudo-classes', ':focus')}}{{Spec2('CSS2.1')}}Ursprüngliche Definition
+ +

Browser Kompatibilität

+ +

{{Compat("css.selectors.focus")}}

+ +

Siehe auch

+ +

 

+ + + +

 

-- cgit v1.2.3-54-g00ecf