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

datalazyload 是否可以添加 srcprefix 和 srcset 配置? #3

Open
yiminghe opened this issue May 20, 2013 · 0 comments
Open

datalazyload 是否可以添加 srcprefix 和 srcset 配置? #3

yiminghe opened this issue May 20, 2013 · 0 comments

Comments

@yiminghe
Copy link
Contributor

@nanqiu

  • srcprefix: 用户配置图片前缀,通常来说,一个网站所引图片应该来自同一处,这样 html 中可以少输出一段前缀,脚本里加上;
  • srcset:用户配置在不同分辨率下要加载的图片地址或者在源路径基础上需要执行的正则替换,如:
{
    srcset: {
        'min-width:480px': 'http://...',
        'max-width:1200px': [/\d/, 'aa']
    }
}
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