仅在可见时加载图像? [英] Load image only when it is viewable?

查看:79
本文介绍了仅在可见时加载图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到一些有大量图像的网页,只有滚动视口内的图像才显示出来,对于外部图像,当我向下滚动时,它会被加载。



如何做到这一点?

解决方案

试试这个jquery延迟加载插件,是非常可定制的,
,您不必处理跨浏览器问题:

http://plugins.jquery.com/project/lazyload


I saw some web page which has a large number of images, only the images inside the scrolled viewport is displayed, for the outside images, when I scroll down to it, it will be loaded.

How that can be done?

解决方案

try this jquery lazy load plugin, it works great, is very customizable, and you dont have to deal with cross browser issues :

http://plugins.jquery.com/project/lazyload

这篇关于仅在可见时加载图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆