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

建议__sprite可以分组打包 #2

Closed
p2227 opened this issue Apr 13, 2017 · 1 comment
Closed

建议__sprite可以分组打包 #2

p2227 opened this issue Apr 13, 2017 · 1 comment

Comments

@p2227
Copy link

p2227 commented Apr 13, 2017

比如

.icon-level-1 {
  background-image: url(../images/level-1.png?__sprite1); //参数形式可以另外定
}
.icon-level-2 {
  background-image: url(../images/level-2.png?__sprite1);
}
.icon-level-3 {
  background-image: url(../images/level-2.png?__sprite2);
}

生成

.icon-level-1 {
  background-image: url(images/sprite-bbb.png);
  xxx
}
.icon-level-2 {
  background-image: url(images/sprite-bbb.png);
  xxx
}
.icon-level-3 {
  background-image: url(images/sprite-aaa.png);
  xxx
}

有时候可以避免首屏的图标载入太慢。
或者有特殊模块可以另外载入处理

@kidney
Copy link

kidney commented Apr 13, 2017

支持分组雪碧图,是用文件夹区分,https://github.com/zuzucheFE/guido/blob/master/docs/css-images-sprite.md#分组切割场景

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants