::cue
Spec The ::cue pseudo-element (with no argument) matches any list of WebVTT Node Objects constructed for the matched element, with the exception that the properties corresponding to the background shorthand must be applied to the WebVTT cue background box rather than the list of WebVTT Node Objects.
MDN The ::cue CSS pseudo-element matches WebVTT cues within a selected element. This can be used to style captions and other cues in media with VTT tracks.
video {
width: 100%;
}
video::cue {
font-size: 1rem;
color: yellow;
}
::cue(u) {
color: red;
} <video controls src="https://developer.mozilla.org/shared-assets/videos/friday.mp4">
<track
default
kind="captions"
srclang="en"
src="https://developer.mozilla.org/shared-assets/misc/friday.vtt" />
Sorry, your browser doesn't support embedded videos.
</video> Syntax
::cue
::cue(selector) Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.
Browser support
| Chrome | 26 |
|---|---|
| Edge | 79 |
| Firefox | 55 |
| Safari | 7 |
| Chrome Android | 26 |
| Safari iOS | 7 |
First version with support, from MDN browser-compat-data.