1
0
Fork 0

Add more images and random start

This commit is contained in:
Jared Szechy 2021-08-31 20:40:19 -04:00
parent fc07325194
commit 80f6699c5c
6 changed files with 53 additions and 38 deletions

BIN
images/10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

BIN
images/6.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

BIN
images/7.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

BIN
images/8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

BIN
images/9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

View File

@ -26,12 +26,12 @@ img {vertical-align: middle;}
}
@-webkit-keyframes fade {
from {opacity: .4}
from {opacity: .2}
to {opacity: 1}
}
@keyframes fade {
from {opacity: .4}
from {opacity: .2}
to {opacity: 1}
}
</style>
@ -55,11 +55,26 @@ img {vertical-align: middle;}
<div class="mySlides fade">
<img src="images/5.jpg">
</div>
<div class="mySlides fade">
<img src="images/6.jpg">
</div>
<div class="mySlides fade">
<img src="images/7.jpg">
</div>
<div class="mySlides fade">
<img src="images/8.jpg">
</div>
<div class="mySlides fade">
<img src="images/9.jpg">
</div>
<div class="mySlides fade">
<img src="images/10.jpg">
</div>
</div>
<script>
var slideIndex = 0;
var slideIndex = Math.floor(Math.random() * 10);
showSlides();
function showSlides() {
@ -71,7 +86,7 @@ function showSlides() {
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
slides[slideIndex-1].style.display = "block";
setTimeout(showSlides, 5000); // Change image every 2 seconds
setTimeout(showSlides, 3500); // Change image every 3 seconds
}
</script>