The not Pseudo-Class for Exclusions in CSS


Use the :not() pseudo-class to apply styles to elements except those matching a certain selector.

Source Code

div:not(.exclude) {
    background-color: #f0f0f0;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments