:current
Le sélecteur de pseudo-classe CSS :current
est une pseudo-classe agissant dans la dimension temporelle et représentant l'élément actuellement affiché, ou un ancêtre de cet élément. Ce sélecteur peut par exemple servir dans le cas d'une vidéo ayant des sous-titres affichés à l'aide du format WebVTT.
:current(p, span) {
background-color: yellow;
}
Syntaxe
Exemples
CSS
:current(p, span) {
background-color: yellow;
}
HTML
<video controls preload="metadata">
<source src="video.mp4" type="video/mp4" />
<source src="video.webm" type="video/webm" />
<track label="Français" kind="subtitles" srclang="fr" src="subtitles.vtt" default>
</video>
WebVTT
FICHIER WEBVTT 1 00:00:03.500 --> 00:00:05.000 Voici le premier sous-titre 2 00:00:06.000 --> 00:00:09.000 Voici le second sous-titre 3 00:00:11.000 --> 00:00:19.000 Voici le troisième sous-titre
Spécifications
No specification found
No specification data found for css.selectors.current
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Compatibilité des navigateurs
No compatibility data found for css.selectors.current
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.