Swiper中文论坛
标题:
swiper插件进行预加载但是它一直加载
[打印本页]
作者:
NARUTO
时间:
2015-12-14 15:55
标题:
swiper插件进行预加载但是它一直加载
不知道为什么用swiper插件的预加载功能它一直在加载,不会出来图片
php:<a href="javascript:void(0);" class="pddct-imgwp">
<div class="swiper-container swiper-container-horizontal">
<div class="swiper-wrapper">
<% for(var i =0;i<goods_image.length;i++){ %>
<div class="swiper-slide swiper-slide-active" style="width: 1920px;">
<img data-src="<%=goods_image[i]%>" class="swiper-lazy"/>
<div class="swiper-lazy-preloader"></div>
</div>
<%}%>
</div>
</div>
</a>
已经引入了swiper的css库和min,js
js如下:<script type="text/javascript">
window.onload=function(){
var swiper = new Swiper('.swiper-container', {
lazyLoading : true,
});
}
</script>
急,有哪位大神可以帮帮忙
作者:
li84233
时间:
2015-12-14 16:11
看一下 浏览器里 img 是不是src
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2