The not pseudo-class
The not pseudo-class specifies a
negation, for example, p:not(.last)
means select all paragraphs that do not
have the last class. Nested not
do not work.
Syntax
cssselector:not(negation) {
}
Example
Let's make all li red,
except the first one:
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;
}
Результат: