-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Hello, I want to realize function, like this:
In /src/images/slice/
have two pic: test.png
and test@2x.png
Css In
.icon-test {
width: 32px;
height: 32px;
background-image: url(../slice/test.png);
}
Css Out
.icon-test {
background-image: url(../sprite/style-index.png);
}
// Retina 2x supported
@media only screen and (-webkit-min-device-pixel-ratio: 2),
only screen and (min--moz-device-pixel-ratio: 2),
only screen and (-webkit-min-device-pixel-ratio: 2.5),
only screen and (min-resolution: 240dpi) {
.icon-test {
background-image:url("../sprite/style-index@2x.png");
background-position: -36px -66px;
background-size: 32px;
}
}
reference: gulp-tmtsprite
jt3k and Robin-front
Metadata
Metadata
Assignees
Labels
No labels