Skip to content
New issue

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

imglazyload是否考虑支持background-image加载 #212

Open
fancyoung opened this issue Jul 25, 2014 · 0 comments
Open

imglazyload是否考虑支持background-image加载 #212

fancyoung opened this issue Jul 25, 2014 · 0 comments

Comments

@fancyoung
Copy link

现在是直接设置src,但background-image形式加载图片可以通过cover实现自动缩放。

现在只能手动改源码:
!isImg && $div.replaceWith($img);改为$div.attr('style', 'background-image: url('+url+')');

@fancyoung fancyoung changed the title imagelazyload是否考虑支持background-image加载 imglazyload是否考虑支持background-image加载 Jul 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant