Sometimes, we want to exclude a particular class name in CSS selector.
In this article, we’ll look at how to exclude a particular class name in CSS selector.
How to exclude a particular class name in CSS selector?
To exclude a particular class name in CSS selector, we use the :not
pseudoselector.
For instance, we write
.reMode_hover:not(.reMode_selected):hover {
}
to select all the elements that has the reMode_hover:not
but not the reMode_hover:not
class.
Conclusion
To exclude a particular class name in CSS selector, we use the :not
pseudoselector.