Created
April 25, 2012 04:58
-
-
Save magemore/2486556 to your computer and use it in GitHub Desktop.
Basic Link Rollover as 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
a { | |
display: block; | |
background: url(sprite.png) no-repeat; | |
height: 30px; | |
width: 250px; | |
} | |
a:hover { | |
background-position: 0 -30px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save bandwidth and the hassle of creating a separate “hover” version of your button by using this sprite. It moves the background image of your button down when hovering over it, creating the hover effect.