Comments (1)
尝试一下,
弃用IMG,改用background-image的实现形式。最开始给又默认填充图的元素赋予样式
{
background-position:center;
background-size:菊花图实际大小
}
然后再在调用lazyload时多加一个option
$(xxxx).lazyload({
load:function($ele){
$ele.css({
'background-position':'0 0',
'background-size':'auto'
})
}
})
from lazyload.
Related Issues (20)
- 加载问题 HOT 2
- 关于加载顺序导致提示找不到jq或者zepto HOT 6
- 使用背景来替换显示(padding-top)Android端得不到background-images值 HOT 2
- 参数未继承
- 如何让一个不是图片地址的url赋值到图片的src上? HOT 3
- 懒加载在浏览器效果ok,在app客户端 webview 中没有效果,图片一下子都加载了,急! HOT 2
- 产品详情或文章详情页面,很多图片是后台编辑框插入的,已经带有src属性了,怎么改成data-original呢? HOT 2
- 当图片不知道宽高的时候不知如何处理 HOT 1
- zepto 么有动画效果 HOT 1
- 请问插件支持chrome吗?
- lazyload好像和react有冲突?
- 没有 destroy 相关的方法吗?
- getUnloadElements里面不能正确获取_lazyload_loadStarted属性 HOT 2
- 连续加载两次图片 HOT 1
- 页面page上有zoom 的时候,懒加载不正确,部分无法加载
- 有个问题,ajax选项卡切换,某些手机浏览器图片无法加载 HOT 3
- 为什么在移动端显示图片用div background image,不用img标签? HOT 4
- ajax加载图片,lazyload失效 HOT 2
- enabled_wide_container例子有问题 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lazyload.