图片过多,让多余图片延迟显示,滚动到图片的位置再加载图片
$(document).ready(function(){
$("img").each(function(){
if( ($(this).offset().top + $(this).height()/8) < $(window).height() ){
$(this).attr("src", $(this).attr("x-src"));
}
});
});
wind...
转载
2020-09-07 15:53:35 ·
246 阅读 ·
0 评论