-
-
Save bradsknutson/6432814 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test | CSS3 Slide Rollover Social Media Icons</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div class="social-slide"> | |
<div class="social-image"> | |
<a href="https://twitter.com/" target="_blank"> | |
<img src="assets/icons/social-icon-twitter.png" alt="Follow us on Twitter" /> | |
</a> | |
</div> | |
</div> | |
</body> | |
</html> |
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
.social-slide { | |
/* Controls image height visibility */ | |
height: 24px; | |
/* Controls image width visibility */ | |
width: 24px; | |
/* Hides bottom half of the image */ | |
overflow: hidden; | |
margin: 10px; | |
float: left; | |
} | |
.social-slide:hover { | |
box-shadow: 0px 0px 2px 1px rgba(0,0,0,0.8); | |
} | |
.social-slide img { | |
position: absolute; | |
top: 0px; | |
/* Controls overall image height */ | |
height: 48px; | |
/* Controls overall image width */ | |
width: 24px; | |
-webkit-transition: all ease 0.3s; | |
-moz-transition: all ease 0.3s; | |
-o-transition: all ease 0.3s; | |
-ms-transition: all ease 0.3s; | |
transition: all ease 0.3s; | |
} | |
.social-slide img:hover { | |
top: -24px; | |
} | |
.social-image { | |
position: relative; | |
/* Controls image height window */ | |
height: 48px; | |
/* Controls image width window */ | |
width: 24px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment