"css video test"
Bootstrap 3.3.0 Snippet by rayrc

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<figure id="fashion">
<video controls>
<source src="http://webmx.me/assets/video/explode.mp4">
<source src="http://webmx.me/assets/video/explode.webm">
</video>
<div id="vid-cover"></div>
<figcaption>.<span>.</span></figcaption>
</figure>
<button id="play-button">Play</button>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
@keyframes overlay {
30% {
left: 0;
width: 50%;
}
50% {
background: #00f;
}
80% {
left: 80%;
width: 20%;
}
100% {
left: 60%;
width: 40%;
background: #00f;
}
}
figure#fashion {
display: inline-block;
position: relative;
font-size: 0;
margin: 0;
}
figure#fashion video {
width: 100%;
}
figure#fashion div {
width: 100%;
height: 100%;
background: #f00;
background-image:url(//webmx.me/assets/underwater.jpg);
position: absolute;
top: 0;
mix-blend-mode: multiply multiply;
left: 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
var playbutton = document.getElementById("play-button");
var fashion = document.querySelector("#fashion video");
fashion.removeAttribute("controls");
playbutton.addEventListener("click", function() {
fashion.play();
fashion.classList.add("playing");
})
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: