仅当图像在视口中时才如何延迟加载图像? [英] How do you make images load lazily only when they are in the viewport?

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

问题描述

这些天,我看到了很多网站,主要是教程网站,这些网站上有很多图像,并且它们只有在进入查看端口后才在页面下方加载图像?

I am seeing a lot of sites these days, mainly tutorial sites that have a lot of images and they only load images further down the page once they come into the view port?

我将如何去做?
向下滚动页面时,位于视口下方的图像会逐渐淡入

How would I go about doing this? As you scroll down the page the images who were below the viewport fade in

推荐答案

http://www.appelsiini.net/projects/lazyload

https://github.com/tuupola/jquery_lazyload

演示:

http://www.appelsiini.net/projects/lazyload/enabled。 html

这篇关于仅当图像在视口中时才如何延迟加载图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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