css pseudo class
`:past` CSS pseudo-class
The :past CSS pseudo-class selector is a time-dimensional pseudo-class that will match for any element which appears entirely before an element that matches :current. For example in a video with captions which are being displayed by WebVTT.
:past(p, span) {
display: none;
}
Syntax
:past {
/* ... */
}
Examples
CSS
:past(p, span) {
display: none;
}
HTML
<video controls preload="metadata">
<source src="/firefox/mdn-asset-missing.svg" type="video/mp4" />
<source src="/firefox/mdn-asset-missing.svg" type="video/webm" />
<track
label="English"
kind="subtitles"
srclang="en"
src="/firefox/mdn-asset-missing.svg"
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
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.