Last active
July 22, 2016 18:44
-
-
Save leepettijohn/88ae3f0212b6948e0864 to your computer and use it in GitHub Desktop.
Rollovers in CSS
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
| <a href="#" class="rollover" title="Webvamp"><span class="displace">Webvamp</span></a> |
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
| /* put default state on the left*/ | |
| a.rollover { | |
| display: block; | |
| width: 150px; | |
| height: 44px; | |
| text-decoration: none; | |
| background: url("http://www.webvamp.co.uk/uploads/2009/02/webvamp-sprite.png"); | |
| transition-duration:0s; | |
| } | |
| a.rollover:hover { | |
| background-position: -150px 0; | |
| transition-duration:0s; | |
| } | |
| .displace { | |
| position: absolute; | |
| left: -5000px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment