Skip to content

Commit b1379f4

Browse files
committed
adding past
1 parent 9ace1d9 commit b1379f4

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

time/past.html

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>The :past pseudo-class</title>
6+
<link rel="stylesheet" href="styles.css" />
7+
<style>
8+
* {
9+
box-sizing: border-box;
10+
}
11+
12+
video {
13+
max-width: 300px;
14+
}
15+
</style>
16+
17+
<style class="editable">
18+
19+
:past(p, span) {
20+
background-color: red;
21+
}
22+
</style>
23+
</head>
24+
25+
<body>
26+
<section class="preview">
27+
<video controls preload="metadata">
28+
<source src="video.mp4" type="video/mp4" />
29+
<source src="video.webm" type="video/webm" />
30+
<track label="English" kind="subtitles" srclang="en" src="subtitles.vtt" default>
31+
</video>
32+
</section>
33+
34+
<textarea class="playable playable-css" style="height: 200px;">
35+
:past(p, span) {
36+
background-color: red;
37+
}
38+
</textarea>
39+
40+
<textarea class="playable playable-html" style="height: 150px;">
41+
<video controls preload="metadata">
42+
<source src="video.mp4" type="video/mp4" />
43+
<source src="video.webm" type="video/webm" />
44+
<track label="English" kind="subtitles" srclang="en" src="subtitles.vtt" default>
45+
</video>
46+
</textarea>
47+
48+
<div class="playable-buttons">
49+
<input id="reset" type="button" value="Reset" />
50+
</div>
51+
</body>
52+
<script src="../playable.js"></script>
53+
</html>

time/subtitles.vtt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ WEBVTT FILE
22
33
1
44
00:00:03.500 --> 00:00:05.000
5-
THis is the first caption
5+
This is the first caption
66

77
2
88
00:00:06.000 --> 00:00:09.000
99
This is the second caption
1010

1111
3
1212
00:00:11.000 --> 00:00:19.000
13-
THis is the third caption
13+
This is the third caption
14+
15+
There are five captions.
1416

1517
4
1618
00:00:19.000 --> 00:00:24.000

0 commit comments

Comments
 (0)