-
Notifications
You must be signed in to change notification settings - Fork 7
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
1倍图也添加background-size #59
Comments
请问可以具体说下 rem 适配时候必须要定义background-size 的原因是? |
rem适配的原理就是根据html的font-size缩放适配,如果没有定义background-size的时候会导致背景图还是原图片大小,这样通过背景图定位裁剪就不准了。 |
哦 明白了 |
我提了个了PR,可以直接合一下,呵呵 |
发了个新包,增加了 |
亲,你还是没改对地方,你只是加他配置是否要加上background-size,但是还是绕开了1倍图的。
|
因为正常情况下不必在 1x 下也输出 |
那你加这个配置意义何在?2x图和3x图本身就必须要指定background-size,现在的问题就是1x的没有指定background-size导致rem布局下定位裁剪出错 |
加了这个 option 且设为 true 情况下就会有 1,2,3x 下都会输出 |
TKS,可以了,但是推荐只对一倍图控制就好,因为2x和3x本身就需要指定background-size |
能否增加一个配置1倍图也添加background-size,不然的做rem适配的时候因为没有定义background-size会有问题
The text was updated successfully, but these errors were encountered: