Created
December 13, 2012 10:39
-
-
Save jorjun/4275621 to your computer and use it in GitHub Desktop.
Using Zwoptex to generate your CSS sprite sheets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.icon { | |
display:block; | |
background-image:url("SPRITE_SHEET.png"); | |
background-repeat:no-repeat; | |
} | |
{% for sprite in spritesAndAliases %} | |
.sprt_{{ sprite.nameWithoutExtension }} { | |
background-position: -{{ sprite.textureRectX }}px -{{ sprite.textureRectY }}px; | |
height: {{ sprite.textureRectHeight }}px; | |
width:{{ sprite.textureRectWidth }}px; | |
} | |
{% /for %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment