鼠标单击图像后,滑条滑块加速

时间:2020-11-09 11:43:01

标签: javascript slick.js

在“滑动滑块”中单击图像时,所有幻灯片都会高速向前移动。如何摆脱这种行为?

我的JS设置:

$(document).ready(function(){
    $('.sh_product_slider2').slick({
      slidesToShow: 3,
      slidesToScroll: 1,
      arrows: true,
      dots: true,
      centerMode: false,
      variableWidth: true,
      infinite: true,
      focusOnSelect: true,
      cssEase: 'linear',
      touchMove: false,
      prevArrow:'<button class="slick-prev"> < </button>',
      nextArrow:'<button class="slick-next"> > </button>',
               responsive: [                        
                   {
                     breakpoint: 600,
                     settings: {
                       centerMode: false,
                       variableWidth: true,
                       slidesToShow: 1,
                       slidesToScroll: 1,
                       autoplay: true,
                       autoplaySpeed: 2500,
                       pauseOnHover: false, 
                       pauseOnFocus: false,
                       arrows:false
                     }
                   },
               ]
    });
});

1 个答案:

答案 0 :(得分:1)

不确定,但根据您的样品看来可以正常工作 只是覆盖CSS类

.sh_product_slider2 .slick-slide:after {
  position: relative;
}

让我知道是否有效, 谢谢