:past
Quick Summary for :past
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.
Code Usage for :past
:past(p, span) { display: none; }
More Details for :past
:past
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="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
Specifications
Specification |
---|
Selectors Level 4 # the-past-pseudo |
See also
Web Video Text Tracks Format (WebVTT):current
:future
Last modified: Jan 24, 2022, by MDN contributors
Select your preferred language English (US)Français Change language Posted in
12:22 am, February 22, 2022
Add Comment
Other Items in CSS
rgb()
rgba()
:right
right
@right-bottom
:root
rotate
rotate()
rotate3d()
rotateX()
rotateY()
rotateZ()
row-gap
ruby-align
ruby-position
saturate()
scale
scale()
scale3d()
scaleX()
scaleY()
scaleZ()
:scope
scroll-behavior
scroll-margin
scroll-margin-block
scroll-margin-block-end
scroll-margin-block-start
scroll-margin-bottom
scroll-margin-inline
scroll-margin-inline-end
scroll-margin-inline-start
scroll-margin-left
scroll-margin-right
scroll-margin-top
scroll-padding
scroll-padding-block
scroll-padding-block-end
scroll-padding-block-start
scroll-padding-bottom
scroll-padding-inline
scroll-padding-inline-end
scroll-padding-inline-start
scroll-padding-left
scroll-padding-right
scroll-padding-top
scroll-snap-align
scroll-snap-stop
scroll-snap-type
@scroll-timeline