css3轮播图判断逻辑

2020-06-09  本文已影响0人  且听风吟_792d

if(this.curIndex == this.curBannerList.length){
this.refs.swiperContent.style.transition = ""; this.curIndex = 0; this.refs.swiperContent.style.left = -this.curIndex * 375 + "px";
} else {
++this.curIndex;
this.refs.swiperContent.style.transition = "all 0.5s"; this.refs.swiperContent.style.left = -this.curIndex * 375 + "px";
}

上一篇下一篇

猜你喜欢

热点阅读