Skip to content

Instantly share code, notes, and snippets.

@mufaddalmw
Last active December 15, 2015 03:29
Show Gist options
  • Save mufaddalmw/5194845 to your computer and use it in GitHub Desktop.
Save mufaddalmw/5194845 to your computer and use it in GitHub Desktop.
Resolve CSS3 onhover opacity animation image movement bug using scale and backface properties.
img {
opacity: .8;
transition:0.5s linear opacity;
-webkit-transition:0.5s linear opacity;
-moz-transition:0.5s linear opacity;
-webkit-backface-visibility: hidden;
-webkit-transform: translateZ(0) scale(1.0, 1.0);
-moz-backface-visibility: hidden;
-moz-transform: translateZ(0) scale(1.0, 1.0);
}
img:hover {
opacity:1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment