let eleSwap=$('.introduction-aliyun')[0],
timerSwap=setInterval(func,6000),
currentPage=true;
function func(){
if(currentPage){
console.log(1)
console.log(getComputedStyle(eleSwap).background)
eleSwap.style.backgroundImage="url('/static/img/homepage/banner-bg-alibaba.png')";
}else{
console.log(2)
console.log(getComputedStyle(eleSwap).background)
eleSwap.style.backgroundImage="url('/static/img/homepage/ali-swap-bg.png')";
}
currentPage=!currentPage;
}
双图轮播
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 网易轮播图: 案例素材及源码:链接:http://pan.baidu.com/s/1pLgzkVp 密码:9buw...
- 最近在学习Vue,然后做了一个轮播图,然后想起之前用jQuery做的轮播图,就打算进行一个对比。 jQuery轮播...
- 需求:广告图100%宽度,最小宽度1920,图片居中显示jQuery问题:浏览器可视宽度小于1920时,图片无法水...