:future
:future
CSS 伪类 选择器是一个时间维度的伪类,它将匹配任何完全出现在与 :current
匹配的元素之后的元素。例如,在一个使用 WebVTT 显示字幕的视频中。
css
:future(p, span) {
display: none;
}
语法
css
:future {
/* ... */
}
示例
CSS
css
:future(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
规范
规范 |
---|
选择器级别 4 # the-future-pseudo |
浏览器兼容性
BCD 表格仅在浏览器中加载