Skip to content

Instantly share code, notes, and snippets.

@fjaguero
Created October 31, 2012 09:16
Show Gist options
  • Save fjaguero/3986015 to your computer and use it in GitHub Desktop.
Save fjaguero/3986015 to your computer and use it in GitHub Desktop.
CSS - Transitions with Sprites
.icon-facebook {
background-position: -50px 0;
width: 20px;
height: 19px;
position: relative;
text-indent: -9999px;
display: inline-block;
}
.icon-facebook:after{
background: url("images/sprites/sprite-icons.png") no-repeat scroll -75px 0 transparent;
bottom: 0;
content: "";
left: 0;
opacity: 0;
position: absolute;
right: 0;
top: 0;
-webkit-transition: opacity .5s ease 0s;
-moz-transition: opacity .5s ease 0s;
-ms-transition: opacity .5s ease 0s;
-o-transition: opacity .5s ease 0s;
transition: opacity .5s ease 0s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment