<!-- HTML -->
<!DOCTYPE html>
<html lang="en">
<!--codingflicks.com-->
<head>
<meta charset="UTF-8">
<title>Video Slideshow using HTML CSS and Javascript</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<video autoplay="" class="box1" id="box1" src="4.mp4"></video>
<video autoplay="" class="box2" id="box2" src="5.mp4"></video>
<video autoplay="" class="box3" id="box3" src="6.mp4"></video>
</div>
<script>
var box1 = document.getElementById('box1');
var box2 = document.getElementById('box2');
var box3 = document.getElementById('box3');
box1.onended = function () {
box2.play();
box1.style.opacity=0;
box2.style.opacity=1;
}
box2.onended = function () {
box3.play();
box2.style.opacity=0;
box3.style.opacity=1;
}
box3.onended = function () {
box1.play();
box3.style.opacity=0;
box1.style.opacity=1;
}
</script>
</body>
</html>
<!-- CSS -->
* {
margin: 0;
padding: 0;
}
video {
width: 100%;
height: 100%;
position: absolute;
object-fit: cover;
transition: all 150ms linear;
z-index: 10;
}
.box1 {
opacity: 1;
}
.box2 {
opacity: 0;
}
.box3 {
opacity: 0;
}
.container {
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
}
Code Example |
---|
Html :: set file allow html |
Html :: checkbox group |
Html :: ionic 5-star-rating |
Html :: img src |
Html :: html input autocomplete=off not working |
Html :: how to add image in checkbox in html |
Html :: how to change time in minecraft |
Html :: jquery ajax add loading |
Html :: html <br |
Html :: how to make text uppercase html |
Html :: html stands for |
Html :: how to add css file in wordpress |
Html :: youtube start end |
Html :: how to make a table in html |
Html :: html iframe connection refused |
Html :: html inline elements |
Html :: html info on hover |
Html :: how to show code with html |
Html :: bootstrap 5 tab |
Html :: unselectable input field |
Html :: react-render-html |
Html :: insertar html en react |
Html :: insert html in html |
Html :: toogle class add and remove class |
Html :: make checkbox required |
Html :: meta tag checker |
Html :: bootstrap tablist |
Html :: html ingnor display none input |
Html :: html vertical text in table cell |
Html :: how to make common header and footer in html |