`:playing` CSS pseudo-class
The :playing CSS pseudo-class selector represents the playback state of an element that is playable, such as audio or video, when that element is "playing". An element is considered to be playing if it is currently playing the media resource, or if it has temporarily stopped for reasons other than user intent (such as :buffering or :stalled).
The :playing CSS pseudo-class selector represents the playback state of an element that is playable, such as audio or video, when that element is "playing".
An element is considered to be playing if it is currently playing the media resource, or if it has temporarily stopped for reasons other than user intent (such as :buffering or :stalled).
Syntax
:playing {
/* ... */
}
Examples
CSS
:playing {
border: 5px solid green;
}
Specifications
Browser compatibility
See also
- :buffering
- :muted
- :paused
- :seeking
- :stalled
- :volume-locked
- CSS selectors