CSS Pseudo-Classes
Selecting elements by state, such as open, checked, playing or focused, with CSS pseudo-classes and their fallbacks.
Content tagged pseudo-classes
Snippet:
:playingand:paused: Style Media by Playback StateStyle audio and video players from their playback state.Style audio and video by playback state with CSS :playing, :paused, :buffering and :muted, plus :has() patterns and a JavaScript fallback.Tutorial:The
:openPseudo-Class for<details>,<dialog>and<select>Style anything that opens, selects included, with one pseudo-class.Style the open state of <details>, <dialog> and <select> with the CSS :open pseudo-class. Compare it with [open], :popover-open and :modal, with fallbacks.