"Slider Simplified"
Bootstrap 4.1.1 Snippet by nshyti

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <style> * {box-sizing: border-box;} body {font-family: Verdana, sans-serif;} .mySlides {display: none;} img {vertical-align: middle;} /* Slideshow container */ .slideshow-container { max-width: 100%; position: relative; margin: auto; background-color: black; } .slider-content { position: absolute; width: 100%; height: 100%; z-index: 1; left: 0; top: 0; /* this padding is used to align the text */ padding-top: 90px; padding-left: 100px; color: white; text-align: left; /* Force Hardware Acceleration */ -webkit-transform: translateZ(0); transform: translateZ(0); will-change: transform; } .slider-content h2 { font-size: 30px; line-height: 1.2em!important; font-weight: 800; } .slider-content p { font-size: 17px; font-weight: 400; line-height: 1.3em!important; padding-top: 8px; padding-bottom: 15px; } .btn { display: inline-block; padding: .7em 1.5em; margin-top: .8em; background-color: #c41230; border-radius: 30px; font-size: 19px!important; font-weight: 600; letter-spacing: 0px; color: #ffffff; text-transform: none; } .btn:hover { background-color: #333333; } /* Caption text */ .text { color: #f2f2f2; font-size: 15px; padding: 8px 12px; position: absolute; bottom: 8px; width: 100%; text-align: center; } /* Number text (1/3 etc) */ .numbertext { color: #f2f2f2; font-size: 12px; padding: 8px 12px; position: absolute; top: 0; } /* The dots/bullets/indicators */ .dot { height: 15px; width: 15px; margin: 0 2px; background-color: #bbb; border-radius: 50%; display: inline-block; transition: background-color 0.6s ease; } .active { background-color: #c41230; } /* 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} } </style> <div class="slideshow-container"> <div class="mySlides fade"> <div class="slider-content"> <h2 style="font-size: 30px; line-height: 1.2em; font-weight: 800; color: #ffffff!important;">Slide 1:<br>Headline Goes Here</h2> <p>Text content will be entered here later.<br> This is just a placeholder for now.<br> The text will be updated.</p> <div class="btn">Learn More</div> </div> <img src="/confluence/download/attachments/217000371/SliderBG%402x.png?api=v2" style="width:100%; height:100%"> </div> <div class="mySlides fade"> <div class="slider-content"> <h2 style="font-size: 30px; line-height: 1.2em; font-weight: 800; color: #ffffff!important;">Slide 1:<br>Headline Goes Here</h2> <p>Text content will be entered here later.<br> This is just a placeholder for now.<br> The text will be updated.</p> <div class="btn">Learn More</div> </div> <img src="/confluence/download/attachments/217000371/SliderBG%402x.png?api=v2" style="width:100%"> </div> <div class="mySlides fade"> <div class="slider-content"> <h2 style="font-size: 30px; line-height: 1.2em; font-weight: 800; color: #ffffff!important;">Slide 1:<br>Headline Goes Here</h2> <p>Text content will be entered here later.<br> This is just a placeholder for now.<br> The text will be updated.</p> <div class="btn">Learn More</div> </div> <img src="/confluence/download/attachments/217000371/SliderBG%402x.png?api=v2" style="width:100%"> </div> </div> <br> <div style="text-align:center"> <span class="dot"></span> <span class="dot"></span> <span class="dot"></span> </div> <script> var slideIndex = 0; showSlides(); function showSlides() { var i; var slides = document.getElementsByClassName("mySlides"); var dots = document.getElementsByClassName("dot"); for (i = 0; i < slides.length; i++) { slides[i].style.display = "none"; } slideIndex++; if (slideIndex > slides.length) {slideIndex = 1} 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"; setTimeout(showSlides, 10000); // Change image every 10 seconds } </script>

Related: See More


Questions / Comments: