添加引用
<script type="text/javascript" src="lazyload/yahoo-dom-event.js"></script>
<script type="text/javascript" src="lazyload/imglazyload-min.js"></script>
图片代码:
<img data-lazyload-src="1.gif" />
<script type="text/javascript">
KISSY.ImageLazyload({
mod: "manual", // 延迟模式。默认为 auto
diff: 10 // 当前屏幕下多远处的图片开始延迟加载。默认两屏外的图片才延迟加载
});
</script>