I'm working on a project with a slideshow, but I've noticed that when it transitions between images, it can be quite abrupt. I'd like to find a way for it to change smoothly from one image to the next.
<div>
<img class="mySlides" src="assets/img/big_logo_1.svg" max-width="100%">
<img class="mySlides" src="assets/img/big_logo_2.svg" max-width="100%">
<img class="mySlides" src="assets/img/big_logo_3.svg" max-width="100%">
</div>
.mySlides {display:none; max-width: 100%;}
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, 3000); // Change image every 3 seconds
}