Created
October 21, 2012 00:06
-
-
Save Lammerink/3925301 to your computer and use it in GitHub Desktop.
CSS : Basic Link Roll Over CSS Sprite
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
Basic Link Rollover as CSS Sprite | |
a { | |
display: block; | |
background: url(sprite.png) no-repeat; | |
height: 30px; | |
width: 250px; | |
} | |
a:hover { | |
background-position: 0 -30px; | |
} | |
The set height and width ensure only a portion of the sprite.png graphic is shown. The rollover shifts the position of the background image, revealing a different area of the graphic. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment