Skip to content

Instantly share code, notes, and snippets.

@bspingarn
Created April 22, 2013 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bspingarn/5437840 to your computer and use it in GitHub Desktop.
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
.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