Created
November 16, 2015 18:22
-
-
Save JeffAspen/3d0b81ee4c1a5054694c to your computer and use it in GitHub Desktop.
CSS Image Swap
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
<div class="hover_effect"> | |
<img src="PATH-TO-FIRST-IMAGE" class="first"> | |
<img src="PATH-TO-SECOND-IMAGE" class="second> | |
</div> | |
<style type="text/css" media="screen"> | |
.hover_effect .second { | |
display: none; | |
} | |
.hover_effect:hover .first { | |
display: none; | |
} | |
.hover_effect:hover .second { | |
display: block; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment