Dieser Inhalt wurde automatisch aus dem Englischen übersetzt, und kann Fehler enthalten. Erfahre mehr über dieses Experiment.

View in English Always switch to English

:future CSS-Pseudoklasse

Eingeschränkt verfügbar

Diese Funktion ist nicht Baseline, da sie in einigen der am weitesten verbreiteten Browser nicht funktioniert.

Want more browser support for this feature? Tell us why.

Der :future CSS Pseudoklassen-Selektor ist eine zeitdimensionale Pseudoklasse, die jedes Element abgleicht, das vollständig nach einem Element erscheint, das zur :current passt. Zum Beispiel in einem Video mit Untertiteln, die durch WebVTT angezeigt werden.

css
:future(p, span) {
  display: none;
}

Syntax

css
:future {
  /* ... */
}

Beispiele

CSS

css
:future(p, span) {
  display: none;
}

HTML

html
<video controls preload="metadata">
  <source src="/api/v1/web-embed/proxy?proxyUrl=https%3A%2F%2Fdeveloper.mozilla.org%2Fde%2Fdocs%2FWeb%2FCSS%2FReference%2FSelectors%2Fvideo.mp4&mode=full" type="video/mp4" />
  <source src="/api/v1/web-embed/proxy?proxyUrl=https%3A%2F%2Fdeveloper.mozilla.org%2Fde%2Fdocs%2FWeb%2FCSS%2FReference%2FSelectors%2Fvideo.webm&mode=full" type="video/webm" />
  <track
    label="English"
    kind="subtitles"
    srclang="en"
    src="/api/v1/web-embed/proxy?proxyUrl=https%3A%2F%2Fdeveloper.mozilla.org%2Fde%2Fdocs%2FWeb%2FCSS%2FReference%2FSelectors%2Fsubtitles.vtt&mode=full"
    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

Spezifikation
Selectors Level 5
# the-future-pseudo

Browser-Kompatibilität

Siehe auch