Pseudo-klassen not
Pseudo-klassen not anger negation,
till exempel, p:not(.last) betyder välj
alla stycken som inte har klassen last.
Kapslade not fungerar inte.
Syntax
cssselektor:not(negation) {
}
Exempel
Gör alla li röda utom den första:
html<ul>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
<li>list item</li>
</ul>cssli:not(:first-child) {
color: red;
}
Результат: