Created
April 22, 2013 19:37
-
-
Save bspingarn/5437840 to your computer and use it in GitHub Desktop.
Problem: IE rotate animation acting unpredictable
Solution: animate something else just for IE
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
.rotating { | |
-webkit-animation: rotating 2s linear infinite; | |
-moz-animation: rotating 2s linear infinite; | |
-ms-animation: rotating 1s linear infinite; | |
} | |
@-webkit-keyframes rotating { | |
from{ | |
-webkit-transform: rotate(360deg); | |
-webkit-transform-origin: 50% 50%; | |
} | |
to{ | |
-webkit-transform: rotate(0deg); | |
-webkit-transform-origin: 50% 50%; | |
} | |
} | |
@-moz-keyframes rotating { | |
from{-moz-transform: rotate(360deg);} | |
to{-moz-transform: rotate(0deg);} | |
} | |
/* rotate works shitty in IE so instead animate opacity*/ | |
@-ms-keyframes rotating { | |
0%{opacity: 0.25;} | |
50%{opacity: 1;} | |
100%{opacity: 0.25;} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment