|
大佬们,救救孩子
文本数据只有一条,为什么轮播到第二个的时候会自动停止
之前刚做的时候还好好的,用了一段时间就出现这种情况。
/*****************html********************/
<div class="swiper-container" id="swiper2">
<div class="swiper-wrapper" id="inner"></div>
</div>
/*****************css********************/
#swiper2{
width:55%;
height:6%;
position:absolute;
bottom:1%;right:2%;
overflow:auto;
color:#9497ee;
opacity:0;
/* background-color:#170078; */
}
#swiper2>.swiper-wrapper{
width:100%;height:100%;
-webkit-transition-timing-function: linear;/* 之前是ease-out */
-moz-transition-timing-function: linear;
-ms-transition-timing-function: linear;
-o-transition-timing-function: linear;
transition-timing-function: linear;
}
#swiper2>.swiper-wrapper>.swiper-slide{width:auto;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;}
/*js*/
swiper2 = new Swiper('#swiper2',{
allowTouchMove : false,
speed : 8000,
autoplay : {
delay : 0,
disableOnInteraction: false
},
loop : true,
slidesPerView :'auto',//slide宽度自适应
spaceBetween: 40,//slide间距
freeMode : true,//slide会根据惯性滑动可能不止一格且不会贴合。
});
|
|