0% found this document useful (0 votes)
89 views3 pages

Image Slideshow Guide

The document contains code for a slideshow container that displays multiple images. It includes CSS for styling elements like the slides and dots. JavaScript code controls the slideshow, displaying each slide for 3 seconds before transitioning to the next and updating the active dot indicator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views3 pages

Image Slideshow Guide

The document contains code for a slideshow container that displays multiple images. It includes CSS for styling elements like the slides and dots. JavaScript code controls the slideshow, displaying each slide for 3 seconds before transitioning to the next and updating the active dot indicator.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

<style>

* {box-sizing: border-box;}
body {font-family: Verdana, sans-serif;}
.mySlides {display: none;}
img {vertical-align: middle;}

/* Slideshow container */
.slideshow-container {
max-width: 1000px;
position: relative;
margin: auto;
}

.active {
background-color: #717171;
}

/* 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}
}

/* On smaller screens, decrease text size */


@media only screen and (max-width: 300px) {
.text {font-size: 11px}
}
</style>

<div class="slideshow-container">
<div class="mySlides fade">

<img src="[Link]
IIQM/X5fDI9LLXxI/AAAAAAAABEw/ih7Zd6YCRmEWZ3Z4DhJgewlX4moqUZL9wCPcBGAsYHg/s16000/1.j
pg" style="width:100%" />
</div>
<div class="mySlides fade">

<img src="[Link]
eEZ5xzVzUpU/X5fDCfcXOvI/AAAAAAAABEs/sVyWQkqkQXILtY1-
zqC77E6gbIkUY9FBgCPcBGAsYHg/s16000/[Link]" style="width:100%" />
</div>
<div class="mySlides fade">

<img src="[Link]
l1Z1gcU/X5fC8MWh2II/AAAAAAAABEY/5_PgQfNweRI6hwdIxooDCeB1twnRR1zPQCPcBGAsYHg/s16000/
[Link]" style="width:100%" />
</div>
<div class="mySlides fade">

<img src="[Link]
UH8ZyxbuR6E/X5fC1AU0IhI/AAAAAAAABEU/JcIh9aHy9n4fKykhsnqxLNMf2oHbBeiyQCPcBGAsYHg/s16
000/[Link]" style="width:100%" />
</div>
<div class="mySlides fade">

<img src="[Link]
r2DZ_cuBI/AAAAAAAAAH0/pgI9bix2fB0JIy9Eg6EuCK8OqjQnjWEWwCLcBGAsYHQ/w426-h640/[Link]"
style="width:100%" />
</div>
<div class="mySlides fade">

<img src="[Link]
a9NhaFGgqL8/YOQQcYvagJI/AAAAAAAAAKE/UoOA6SY3ZUUZw2S9ZJ-
RjhBJDsAceHDuACLcBGAsYHQ/s16000/[Link]" style="width:100%" />
</div>

</div>
<br>

<div style="text-align:center">
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>

<script>
var slideIndex = 0;
showSlides();

function showSlides() {
var i;
var slides = [Link]("mySlides");
var dots = [Link]("dot");
for (i = 0; i < [Link]; i++) {
slides[i].[Link] = "none";
}
slideIndex++;
if (slideIndex > [Link]) {slideIndex = 1}
for (i = 0; i < [Link]; i++) {
dots[i].className = dots[i].[Link](" active", "");
}
slides[slideIndex-1].[Link] = "block";
dots[slideIndex-1].className += " active";
setTimeout(showSlides, 3000); // Change image every 2 seconds
}
</script>

You might also like