We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
实现了当前页面的,也作用在动态的更新和加载的图片。
修改需要懒加载的图片的属性,增加一个名称为lazyload的class
并把图片的src设置成通用的loading图片或者空白占位符图片
把图片的真实地址,写入图片的data-img中
经过以上三部,图片的html代码变成如下格式:
//示例 <img src="loading.gif" data-img="a.jpg" class="lazyload">
引入lazyload.js
增加如下代码
$.imgLazyLoad()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
图片懒加载
实现了当前页面的,也作用在动态的更新和加载的图片。
使用非常简单
步骤一
修改需要懒加载的图片的属性,增加一个名称为lazyload的class
步骤二
并把图片的src设置成通用的loading图片或者空白占位符图片
步骤三
把图片的真实地址,写入图片的data-img中
经过以上三部,图片的html代码变成如下格式:
步骤四
引入lazyload.js
步骤五
增加如下代码
The text was updated successfully, but these errors were encountered: