Name
Kind-Selektor
Muster:
element1 >
element2
Beschreibung:
Dieser Selektor-Typ wird verwendet, um ein Element aufgrund seines Status als Kind eines anderen Elements auszuwählen. Er ist restriktiver als ein Nachkommen-Selektor, weil er nur auf ein Kind-Element passt.
Beispiele:
div > p {color: cyan;} ul > li {font-weight: bold;}
Get CSS kurz & gut, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.