CSS :where() Pseudo-class
- Προηγούμενη σελίδα :visited
- Επόμενη σελίδα :active
- Επιστροφή στο προηγούμενο επίπεδο Οδηγός Σημειώσεων Πseudo-Klass CSS
Definition and Usage
CSS :where()
pseudo-classes are used to apply the same style to all elements within the parentheses.
:where()
pseudo-classes require a comma-separated list of selectors as their parameters.
:where()
Pseudo-classes with :is()
pseudo-classes are similar but differ in specificity::where()
has a specificity of 0, while :is()
The specificity depends on the most specific selector among its parameters.
Example
Apply red text color to p.intro, <ul>, and <ol> elements:
:where(p.intro, ul, ol) { color: red; }
CSS Syntax
:where(selector-list) { css declarations; }
Technical Details
Version: | CSS4 |
---|
Browser Support
The numbers in the table specify the first browser version to fully support the pseudo-class.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
88 | 88 | 78 | 14 | 74 |
- Προηγούμενη σελίδα :visited
- Επόμενη σελίδα :active
- Επιστροφή στο προηγούμενο επίπεδο Οδηγός Σημειώσεων Πseudo-Klass CSS