Swiper滑块空格

时间:2015-09-18 10:58:12

标签: slider swiper

Swiper滑块有问题。当我滚动到滑块的末尾时,可以看到一些空白空间。

http://take.ms/siqXj

swiper = new Swiper(profile_images, {
    slidesPerView: 4,
    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev',
    observer: true
});

https://jsfiddle.net/x2zu5ett/1/

  

UPDATE   解决方案:设置' slidesPerView'属于' auto'

1 个答案:

答案 0 :(得分:0)

您还需要帮助吗?
尝试添加以下内容:loopFillGroupWithBlank: false,

检查我的:

var swiper2 = new Swiper('.swiper-container2', {
    slidesPerView: 'auto',
    centeredSlides: true,
    spaceBetween: 150,
    speed: 1500,
    loop: true,
    simulateTouch : true,
    loopFillGroupWithBlank: false,
    grabCursor: true,
    //touchStartPreventDefault: false,
});