0% found this document useful (0 votes)
23 views1 page

New 1

new
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)
23 views1 page

New 1

new
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
You are on page 1/ 1

<html>

<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">


<style>
.mySlides {display:none;}
</style>
<body>

<h2 class="w3-center">Automatic Slideshow</h2>

<div class="w3-content w3-section" style="max-width:500px">


<img class="mySlides" src="fig1.jpg" style="width:100%">
<img class="mySlides" src="fig2.jpg" style="width:100%">
<img class="mySlides" src="fig3.jpg" style="width:100%">
<img class="mySlides" src="fig4.jpg" style="width:100%">
<img class="mySlides" src="fig5.jpg" style="width:100%">
<img class="mySlides" src="fig6.jpg" style="width:100%">
<img class="mySlides" src="fig7.jpg" style="width:100%">

</div>

<script>
var myIndex = 0;
carousel();

function carousel() {
var i;
var x = document.getElementsByClassName("mySlides");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
myIndex++;
if (myIndex > x.length) {myIndex = 1}
x[myIndex-1].style.display = "block";
setTimeout(carousel, 2000); // Change image every 2 seconds
}
</script>

</body>
</html>

You might also like