From de5c456ebded0e038adbf23db34cc290c8829180 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 14:49:24 +0100 Subject: unslug pl: move --- files/pl/web/css/class_selectors/index.html | 86 +++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 files/pl/web/css/class_selectors/index.html (limited to 'files/pl/web/css/class_selectors/index.html') diff --git a/files/pl/web/css/class_selectors/index.html b/files/pl/web/css/class_selectors/index.html new file mode 100644 index 0000000000..12f8d4f5c8 --- /dev/null +++ b/files/pl/web/css/class_selectors/index.html @@ -0,0 +1,86 @@ +--- +title: Selektor klasy +slug: Web/CSS/Selektor_klasy +tags: + - CSS + - Klasy + - Reference + - Selektory +translation_of: Web/CSS/Class_selectors +--- +
{{CSSRef("Selectors")}}
+ +
 
+ +
Selektor klasy wyszukuje każdy element z atrybutem {{htmlattrxref("class")}} w dokumencie HTML. Atrybut {{htmlattrxref("class")}} jest zdefiniowany jako lista przedmiotów oddzielonych ze sobą spacją, jeden z nich musi zgadzać się z podaną klasą w selektorze (CSS).
+ +
 
+ +

Składnia

+ +
.nazwaklasy { właściwości stylu }
+ +

Jest to równoważne z {{Cssxref("Attribute_selectors", "attribute selector")}}:

+ +
[class~=nazwaklasy] { właściwości stylu }
+ +

Przykład

+ +

CSS

+ +
span.classy {
+  background-color: DodgerBlue;
+}
+
+ +

HTML

+ +
<span class="classy">Przykładowy tekst.</span>
+<span>Kolejny przykładowy tekst.</span>
+
+ +

Specyfikacje

+ + + +

Kompatybilność z przeglądarkami

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PrzeglądarkaWsparcie
ChromeTak
EdgeTak
FirefoxTak
Internet ExplorerTak
OperaTak
SafariTak
+ +

 

-- cgit v1.2.3-54-g00ecf