Created
October 25, 2012 23:07
-
-
Save Ricardo-Diaz/3956028 to your computer and use it in GitHub Desktop.
CSS: Link Rollover as Sprite
This file contains hidden or 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 | |
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. | |
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