UNPKG

css-sprite-loader

Version:

A webpack loader to convert png into sprite image

53 lines (47 loc) 1.03 kB
body { margin: 0; } .part { display: inline-block; width: 50%; } .source.simple { width: 128px; height: 128px; background: url('../../fixtures/images/home.png'); } .sprite.simple { width: 128px; height: 128px; background: url('../../fixtures/images/home.png?sprite'); } .source.query { width: 128px; height: 128px; background: url('../../fixtures/images/lollipop.png'); } .sprite.query { width: 128px; height: 128px; background: url('../../fixtures/images/lollipop.png?sprite=sprite'); } .source.rename { width: 128px; height: 128px; background: url('../../fixtures/images/tag.png'); } .sprite.rename { width: 128px; height: 128px; background: url('../../fixtures/images/tag.png?sprite=sprite-nav'); } .source.rename-2 { width: 128px; height: 128px; background: url('../../fixtures/images/html.png'); } .sprite.rename-2 { width: 128px; height: 128px; background: url('../../fixtures/images/html.png?sprite=sprite-nav'); }