Last active
August 29, 2015 14:28
-
-
Save stephenwil/e12739d250fbaf218970 to your computer and use it in GitHub Desktop.
CSS3 Animation Gotchas
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
1) Android (till at least 4.3.1), when animating visibility, e.g accordion type movement: | |
.something { | |
height: 0; | |
max-height: 0; | |
opacity: 0; | |
visibility: hidden; | |
transition: visibilty $timing ease-in, opacity $timing ease-in; | |
&.active { | |
max-height: 500px; // something larger than the actual size | |
height: auto; | |
visibility: visible | |
transition: visibilty $timing ease-in, opacity $timing ease-in; | |
} | |
} | |
Despite the various fixes for backface-visibility, translateZ, translate3d, the item remains as if visibility was hidden | |
Therefore, just animate opacity and/or max-height & height |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment