问题
I have some problem with Swiper slider. When i scroll to the end of slider, some empty spaces is visible.
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 Solution: set 'slidesPerView' attribute to 'auto'
回答1:
Do you still need help?
Try to add this: loopFillGroupWithBlank: false,
Check mine:
var swiper2 = new Swiper('.swiper-container2', {
slidesPerView: 'auto',
centeredSlides: true,
spaceBetween: 150,
speed: 1500,
loop: true,
simulateTouch : true,
loopFillGroupWithBlank: false,
grabCursor: true,
//touchStartPreventDefault: false,
});
来源:https://stackoverflow.com/questions/32650297/swiper-slider-empty-spaces