Slick Slider-居中缩略图导航-1.5张幻灯片显示

时间:2019-11-28 09:06:54

标签: slick swiper

使用光滑的滑块codepen link to example是否可以实现此效果?

使用swiper可以轻松完成,但是我觉得对于其他轮播来说,更好的选择是,我宁愿不在同一个项目上使用这两个库。预先感谢

var galleryTop = new Swiper('.gallery-top', {
  spaceBetween: 1,
         slidesPerView: 1.5,
  navigation: {
    nextEl: '.swiper-button-next',
    prevEl: '.swiper-button-prev',
  },
        loop: true,
        loopedSlides: 4
});
var galleryThumbs = new Swiper('.gallery-thumbs', {
  spaceBetween: 10,
  centeredSlides: true,
  slidesPerView: 'auto',
  touchRatio: 0.2,
  slideToClickedSlide: true,
        loop: true,
        loopedSlides: 4
});
galleryTop.controller.control = galleryThumbs;
galleryThumbs.controller.control = galleryTop;

0 个答案:

没有答案