CSS :matches() Selector
Note: :matches() was renamed to :is().
Note: :matches() was renamed to :is().
Example
:matches(header, main, footer) p:hover {
color: red;
cursor: pointer;
}
Meaning
The :matches() selector function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list. This is useful for writing large selectors in a more compact form.
Also see any(), is() selectors.
Version: CSS3
Standard Syntax
:matches() {
css declarations;
}
Browser Support
The numbers in the table specify the first browser version that fully supports the property.