:past
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Der :past
CSS-Pseudoklassen-Selektor ist eine zeitliche Pseudo-Klasse, die für jedes Element übereinstimmt, das vollständig vor einem Element erscheint, das :current
entspricht. Zum Beispiel in einem Video mit Untertiteln, die durch WebVTT angezeigt werden.
css
:past(p, span) {
display: none;
}
Syntax
css
:past {
/* ... */
}
Beispiele
CSS
css
:past(p, span) {
display: none;
}
HTML
html
<video controls preload="metadata">
<source src="video.mp4" type="video/mp4" />
<source src="video.webm" type="video/webm" />
<track
label="English"
kind="subtitles"
srclang="en"
src="subtitles.vtt"
default />
</video>
WebVTT
WEBVTT FILE 1 00:00:03.500 --> 00:00:05.000 This is the first caption 2 00:00:06.000 --> 00:00:09.000 This is the second caption 3 00:00:11.000 --> 00:00:19.000 This is the third caption
Spezifikationen
Specification |
---|
Selectors Level 4 # the-past-pseudo |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
:past |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.