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

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

问题描述

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

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?

我该怎么做?

一个例子:

http://www.chopeh.com/blog/logo -design-start-finish/

当您向下滚动页面时,视口下方的图像会淡入

As you scroll down the page the images below the view port 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天全站免登陆