Last active
December 15, 2015 03:29
-
-
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.
This file contains hidden or 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
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