Skip to content

Instantly share code, notes, and snippets.

@flexbox
Last active December 11, 2015 20:18
Show Gist options
  • Save flexbox/4653983 to your computer and use it in GitHub Desktop.
Save flexbox/4653983 to your computer and use it in GitHub Desktop.
zoom img using CSS3 transition & transform
.map {
display: block;
overflow: hidden;
}
.map span{
display: block;
height: 250px;
background:url(../img/map.jpg) no-repeat top left;
transition: transform 0.2s linear 0s;
}
.map:hover span{
background-position:0 -250px;
transform: scale(1.25);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment