Create Slide On HTML
Create Slide On HTML
<!DOCTYPE html>
<html>
<head>
<style>
* {box-sizing: border-box;}
/* Slideshow container */
.slideshow-container {
max-width: 1000px;
position: relative;
margin: auto;
/* Caption text */
.text {
color: #f2f2f2;
font-size: 15px;
position: absolute;
bottom: 8px;
width: 100%;
text-align: center;
}
/* Number text (1/3 etc) */
.numbertext {
color: #f2f2f2;
font-size: 12px;
position: absolute;
top: 0;
/* The dots/bullets/indicators */
.dot {
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
.active {
background-color: #717171;
/* Fading animation */
.fade {
animation-name: fade;
animation-duration: 1.5s;
}
@keyframes fade {
to {opacity: 1}
</style>
</head>
<body>
<h2>Automatic Slideshow</h2>
<div class="slideshow-container">
</div>
</div>
</div>
</div>
<br>
<div style="text-align:center">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>
<script>
let slideIndex = 0;
showSlides();
function showSlides() {
let i;
slides[i].style.display = "none";
}
slideIndex++;
slides[slideIndex-1].style.display = "block";
</script>
</body>
</html>