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

合图,压缩css后css中的相对位置变了 #22

Open
HeaveNsHzj opened this issue Jul 14, 2015 · 0 comments
Open

合图,压缩css后css中的相对位置变了 #22

HeaveNsHzj opened this issue Jul 14, 2015 · 0 comments

Comments

@HeaveNsHzj
Copy link

这两天加入了fis的自动合图,这个问题有点无解。
大概是这样的,
.icon.a{ background: url(../img/a.png?__sprite) 0 0 no-repeat}
.icon.b{ background: url(../img/a.png?__sprite) 0 0 no-repeat}

生成的background-position, .icon.b在.icon.a前面。

真实使用场景中,共用同一个background-image,这个会合并写成一行
然后,background-repeat: no-repeat,各自写,顺序是对的,
background-position也是每个selector各自写,顺序好像是随机的。

这样会css优先级出错,希望能够修改,不然很容易出问题。
我觉得理想情况肯定是css内的selector之间的相对位置都不改变,只replace url引用。

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