1
0
Fork 0
nikhil.horse/index.html
2020-12-14 14:09:49 -05:00

79 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>nikhil.horse</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="favicon.ico" rel="icon" type="image/x-icon" />
<style>
* {box-sizing: border-box;}
body {font-family: Verdana, sans-serif;}
.mySlides {display: none;}
img {vertical-align: middle;}
/* Slideshow container */
.slideshow-container {
position: relative;
margin: auto;
text-align: center;
}
/* Fading animation */
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 1.5s;
animation-name: fade;
animation-duration: 1.5s;
}
@-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
</style>
</head>
<body>
<div class="slideshow-container">
<div class="mySlides fade">
<img src="images/1.jpg">
</div>
<div class="mySlides fade">
<img src="images/2.jpg">
</div>
<div class="mySlides fade">
<img src="images/3.jpg">
</div>
<div class="mySlides fade">
<img src="images/4.jpg">
</div>
<div class="mySlides fade">
<img src="images/5.jpg">
</div>
</div>
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
slides[slideIndex-1].style.display = "block";
setTimeout(showSlides, 5000); // Change image every 2 seconds
}
</script>
</body>
</html>