-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
82 lines (72 loc) · 1.85 KB
/
index.html
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
76
77
78
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<style>
html,body { margin: 0; padding: 0; }
.container {
position: relative;
width: 100%;
padding-top: 56.25%;
}
.video-container {
position: absolute;
height: 100%;
width: 33.33%;
top: 0;
overflow: hidden;
}
.video-container:nth-child(1) {
left: 0;
}
.video-container:nth-child(2) {
left: 33.33%;
}
.video-container:nth-child(3) {
left: 66.66%;
}
video {
height: 100%;
width: 100%;
object-fit: cover;
}
#layer {
position: absolute;
inset: 0;
}
.grayscale {
animation-fill-mode: forwards;
animation-duration: .5s;
animation-name: grayscale-in;
}
@keyframes grayscale-in {
to {
backdrop-filter: grayscale(1);
}
}
</style>
<div class="container">
<div class="video-container">
<video src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4?woe" autoplay muted></video>
</div>
<div class="video-container">
<video src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4?wo3eqe" autoplay muted></video>
</div>
<div class="video-container">
<video src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_10mb.mp4?wdddoe" autoplay muted></video>
</div>
<div id=layer></div>
</div>
<script>
const delay = 30;
setTimeout(() => {
layer.classList.add('grayscale')
}, delay * 1000);
// stats.js
(function(){var script=document.createElement('script');script.onload=function(){var stats=new Stats();document.body.appendChild(stats.dom);requestAnimationFrame(function loop(){stats.update();requestAnimationFrame(loop)});};script.src='//mrdoob.github.io/stats.js/build/stats.min.js';document.head.appendChild(script);})()
</script>
</body>
</html>