-
Notifications
You must be signed in to change notification settings - Fork 8k
/
index.md
75 lines (54 loc) · 1.33 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
title: ":future"
slug: Web/CSS/:future
---
{{CSSRef}}
Le sélecteur de [pseudo-classe](/fr/docs/Web/CSS/Pseudo-classes) [CSS](/fr/docs/Web/CSS) **`:future`** est une pseudo-classe agissant dans la dimension temporelle qui cible n'importe quel élément apparaissant entièrement après un élément correspondant à {{cssxref(":current")}}. Ce sélecteur peut par exemple servir dans le cas d'une vidéo ayant des sous-titres affichés à l'aide du format [WebVTT](/fr/docs/Web/API/WebVTT_API).
```css
:future(p, span) {
display: none;
}
```
## Syntaxe
{{csssyntax}}
## Exemples
### 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="Français"
kind="subtitles"
srclang="fr"
src="subtitles.vtt"
default />
</video>
```
### WebVTT
```
FICHIER WEBVTT
1
00:00:03.500 --> 00:00:05.000
Voici le premier sous-titre
2
00:00:06.000 --> 00:00:09.000
Voici le second sous-titre
3
00:00:11.000 --> 00:00:19.000
Voici le troisième sous-titre
```
## Spécifications
{{Specifications}}
## Compatibilité des navigateurs
{{Compat}}
## Voir aussi
- [Web Video Text Tracks Format (WebVTT)](/fr/docs/Web/API/WebVTT_API)
- {{cssxref(":current")}}
- {{cssxref(":past")}}