演示<!doctype html>
<title>图片懒加载-简单</ title> [removed] </ script> <style> ul,li {list-style:none; } .container {width:600px; 保证金:0自动; } .container li {float:left; 边距:10px 10px; } .container li img {width:240px; 高度:180像素; } p {float:left; } </ style>
[removed] $(window).on('scroll',function(){//当页面滚动的时候绑定事件$('。container img')。each(function(){//遍历所有的img标签if(checkShow($(