当用户向下滚动页面时加载图像 -

时间:2022-10-12 21:25:47

I have been noticing a trend in blogs where the images don't load until you scroll down the page and the images appear in the view screen.

我一直注意到博客中的趋势,在向下滚动页面并且图像出现在视图屏幕中之前,图像不会加载。

I imagine that this must be some sort of jquery magic, but after some googling I haven't been able to figure out how it works. Does anyone know how this is done?

我想这一定是某种jquery魔术,但经过一些谷歌搜索我无法弄清楚它是如何工作的。有谁知道这是怎么做的?

EDIT: If you want to see an example of this behavior, check out the portfolios on behance.com

编辑:如果您想查看此行为的示例,请查看behance.com上的投资组合

2 个解决方案

#1


4  

It's achieved with the jQuery plugin Lazy Load.

它是通过jQuery插件Lazy Load实现的。

also look at this question from the jquery forum

还可以从jquery论坛看看这个问题

Look at a similar question Source: How to do the image fade-in effect upon scroll (like mashable.com)

看一个类似的问题来源:如何在滚动时进行图像淡入效果(如mashable.com)

#2


0  

Try this one. Customize the effects as per your needs.

试试这个。根据您的需要自定义效果。

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

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

#1


4  

It's achieved with the jQuery plugin Lazy Load.

它是通过jQuery插件Lazy Load实现的。

also look at this question from the jquery forum

还可以从jquery论坛看看这个问题

Look at a similar question Source: How to do the image fade-in effect upon scroll (like mashable.com)

看一个类似的问题来源:如何在滚动时进行图像淡入效果(如mashable.com)

#2


0  

Try this one. Customize the effects as per your needs.

试试这个。根据您的需要自定义效果。

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

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