CSS Negation Pseudo-Class

« Previous Tutorial Next Tutorial »

The negation pseudo-class, :not, is used to select an element and negate the style that is applied to the element.

CSS Negation Pseudo-Class Example

Some examples of using the :not pseudo-class are given as follows :

button:not([DISABLED])       /* Example 1 */
*:not(P)               /* Example 2 */
html|*:not(:link):not(:visited)    /* Example 3 */

The description of the preceding examples is given as follows :

CSS Online Test

« Previous Tutorial Next Tutorial »

© Copyright 2021. All Rights Reserved.