Výber prvku podľa viacerých tried v CSS

V prípade potreby môžeme vybrať prvok, ktorý má súčasne dve triedy, bez ovplyvnenia prvkov s jednou z týchto tried.

Pozrime sa na príklad. Predpokladajme, že máme nasledujúci kód:

html<p class="eee">
  This is a paragraph with text.
</p>
<p class="zzz">
  This is a paragraph with text.
</p>
<p class="eee zzz">
  This is a paragraph with text.
</p>

Ako vidíte, prvý odsek má triedu eee, druhý odsek - triedu zzz, a tretí odsek - súčasne obe tieto triedy.

Vyberme posledný odsek bez ovplyvnenia ostatných. Na to spojíme bez medzery názov jednej triedy a názov druhej triedy:

css.eee.zzz {
  color: red;
}
Задание 1

Vyberte prvok, ktorý má súčasne triedy eee, zzz a ccc:

html<p class="eee">
  This is a paragraph with text.
</p>
<p class="zzz">
  This is a paragraph with text.
</p>
<p class="ccc">
  This is a paragraph with text.
</p>
<p class="eee zzz ccc">
  This is a paragraph with text.
</p>