:playing

The :playing CSS pseudo-class selector represents an element that is playable, such as <audio> or <video>, when that element is "playing".

A resource is considered to be playing if the user explicitly initiates playback. It is also considered playing when the element is explicitly in a playing state but temporarily paused due to reasons unrelated to user intent. In such cases, the playback will automatically resume once the underlying reason, such as a "buffering" or "stalled" state, is resolved.

Syntax

css

:playing {
  /* ... */
}

Examples

CSS

css

:playing {
  border: 5px solid green;
}

Specifications

Specification
Selectors Level 4
# selectordef-playing

Browser compatibility

BCD tables only load in the browser

See also