weight - Kurs HTML i CSS
- Selektory pseudoklas CSS / Pseudoklasy cykliczne :nth-child :nth-last-child :nth-of-type :nth-last-of-type
...3.2 Komórka 4.1 Komórka 4.2 Komórka 5.1 Komórka 5.2 Komórka 6.1 Komórka 6.2 Nieparzyste definicje listy: dl > dd:nth-of-type(odd) { font-weight: bold } Termin 1 Definicja 1 Termin 2 Definicja 2 Termin 3 Definicja 3 Termin 4 Definicja 4 Termin 5 Definicja 5 Termin 6 Definicja 6 Nieparzyste wiersze poczynając od końca: tbody > tr:nth-last-child(odd) { color: white; background-color: gray } Komórka 1.1 Komórka 1.2 Komórka 2.1 Komórka 2.2 Komórka 3.1 Komórka 3.2 Komórka...
- Dobre praktyki / CSS Zorientowane Obiektowo
...CSS jest w obu przypadkach identyczna: .Information { background-color: white; } div.Warning { color: red; } span.Warning { font-weight: bold; }
- Selektory pseudoklas CSS / Pseudoklasy typu :first-of-type :last-of-type :only-of-type
...tylko elementy określonego typu. Przykład :first-of-type :last-of-type :only-of-type Po wpisaniu w arkuszu stylów: dl > dd:first-of-type { font-weight: bold } /* wytłuszczenie */ dl > dt:last-of-type { font-style: italic } /* kursywa */ dl > dt:only-of-type { text-decoration: underline } /* podkreślenie */ a w dowolnym miejscu strony: <dl> <dt>Termin 1</dt><dd>Definicja 1</dd> <dt>Termin 2</dt><dd>Definicja 2</dd> <dt>Termin 3</dt><dd>Definicja 3</dd> </dl> <dl> <dt>Termin...
- Selektory pseudoklas CSS / Negacja :not
...nie wolno zagnieżdżać, tzn. wstawiać jeden jako argument drugiego. Przykład :not Po wpisaniu w arkuszu stylów: ul > li:not(:first-child) { font-weight: bold } otrzymamy wykaz, w którym wszystkie punkty z wyjątkiem pierwszego (pierwsze dziecko) powinny być pogrubione: Punkt 1 Punkt 2 Punkt 3