0

Is there a way to display all the slides like this:

enter image description here

Probably the left and right of this active slide?

2 Answers2

0

what i used to do is using this script.

<script>
var slideIndex = 1;
showDivs(slideIndex);

function plusDivs(n) {
  showDivs(slideIndex += n);
}

function showDivs(n) {
  var i;
  var x = document.getElementsByClassName("mySlides");
  if (n > x.length) {slideIndex = 1}
  if (n < 1) {slideIndex = x.length}
  for (i = 0; i < x.length; i++) {
     x[i].style.display = "none";
  }
  x[slideIndex-1].style.display = "block";
}
</script>

then the picture can be arrange like this :

<div class="YOUR PICTURE CLASS" style="max-width:800px;position:relative">
  <img class="mySlides" src="img_fjords.jpg" style="width:100%">
  <img class="mySlides" src="img_lights.jpg" style="width:100%">
  <img class="mySlides" src="img_mountains.jpg" style="width:100%">
  <img class="mySlides" src="img_forest.jpg" style="width:100%">

  <a class="w3-btn-floating" style="position:absolute;top:45%;left:0" onclick="plusDivs(-1)">❮</a>
  <a class="w3-btn-floating" style="position:absolute;top:45%;right:0" onclick="plusDivs(1)">❯</a>
</div>

You can learn more detail in this page : http://www.w3schools.com/w3css/w3css_slideshow.asp

nets0011
  • 1
  • 1
-1

use that slick slider instead of the bootstrap carousel ... and use it at the center mode link : http://kenwheeler.github.io/slick/ it will be like that in jquery >> after including the lib files in your website : $('.center').slick({ centerMode: true, centerPadding: '60px', slidesToShow: 3, responsive: [ { breakpoint: 768, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 3 } }, { breakpoint: 480, settings: { arrows: false, centerMode: true, centerPadding: '40px', slidesToShow: 1 } } ] });