|
我的代码部分: <div class="swiper-container-history"> <div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
<div class="swiper-slide">Slide 4</div>
</div>
</div>
js部分:
var swiper_history = new Swiper('.swiper-container-history', {
speed: 1000,
observer: true,
slidesPerView: 7,
spaceBetween: 0,
slidesPerGroup: 7,
breakpoints: {
1024: {
slidesPerView: 7,
slidesPerGroup: 7
},
768: {
slidesPerView: 4,
slidesPerGroup: 4
},
640: {
slidesPerView: 3,
slidesPerGroup: 3
},
320: {
slidesPerView: 2,
slidesPerGroup: 2
}
}
});
但是出来的实际效果是:swiper-slide 元素撑破了包裹 他们的 swiper-wrapper元素,如下图,不知道怎么解决。
|
|