Swiper中文论坛
标题:
swiper3的 swiper-slid 超出了 swiper-wrapper
[打印本页]
作者:
daicooper
时间:
2017-4-10 10:43
标题:
swiper3的 swiper-slid 超出了 swiper-wrapper
我的代码部分: <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元素,如下图,不知道怎么解决。
ssss.png
(68.56 KB, 下载次数: 84)
下载附件
保存到相册
2017-4-10 10:38 上传
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2