Tengo un control deslizante con el botón de clic derecho izquierdo y se desliza bien pero no suave y me gustaría deslizar automáticamente las imágenes de mi banner con una duración de 4-5 segundos, no he encontrado ningún tutorial sobre cómo hacer que se deslice automáticamente, consulte mi secuencia de comandos y css.
<script> var slideIndex = 1; showSlides(slideIndex); function plusSlides(n) { showSlides(slideIndex += n); } function currentSlide(n) { showSlides(slideIndex = n); } function showSlides(n) { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); if (n > slides.length) {slideIndex = 1} if (n < 1) {slideIndex = slides.length} for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } for (i = 0; i < dots.length; i++) { dots[i].className = dots[i].className.replace(" active", ""); } slides[slideIndex-1].style.display = "block"; dots[slideIndex-1].className += " active"; } </script> <div class="slideshow-container"> <div class="thrive-banner-dots"> <span class="dot" onclick="currentSlide(1)"></span> <span class="dot" onclick="currentSlide(2)"></span> <span class="dot" onclick="currentSlide(3)"></span> </div> <div class="mySlides"> <div class="text-animate-slider"> <p>With a strong network of more than 800 colleges and 38,000 institutes, India is the second-largest education hub. The current education system is a blend of theoretical and experimental learning that enables education at par with the global standards. </div> </div> <div class="mySlides"> <div class="text-animate-slider"> <p>India is a land of many discoveries and innovations. The competitive learning environment encourages students to think out-of-the-box and thrive in the academic journey.</p> </div> </div> <div class="mySlides"> <div class="text-animate-slider"> <p>The rich heritage of India is an amalgamation of diverse cultures and religions. So, in addition to attaining inclusive education, there is so much to explore, from multiple cuisines, distinct and joyful festivals to many forms of music, art and dance. </div> </div> <a class="prev-animate-slider" onclick="plusSlides(-1)">❮</a> <a class="next-animate-slider" onclick="plusSlides(1)">❯</a> </div>