offline version v3


234 of 298 menu

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

selector:not(negation) { }

Example

Let's make all li red, except the first one:

<ul> <li>list item</li> <li>list item</li> <li>list item</li> <li>list item</li> <li>list item</li> </ul> li:not(:first-child) { color: red; }

:

enru