Created
February 3, 2015 09:21
-
-
Save wilsoncook/1f440bbad400df08ec61 to your computer and use it in GitHub Desktop.
LESS工具库
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
//---精灵图操作 | |
@spritePic: '../images/sprites.png'; //精灵图地址 | |
.fn-setSprite (@width, @height, @x, @y) { | |
width: @width + 0px; | |
height: @height + 0px; | |
background: url(@spritePic) 0px - @x 0px - @y; | |
} | |
.fn-setSpriteXY (@x, @y) { | |
background-position: 0px - @x 0px - @y; | |
} | |
.fn-setSpriteY (@y) { | |
background-position-y: 0px - @y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment