My SVG animation dilemma:
@keyframes rotate {
100% {
-webkit-transform: rotateZ(360deg);
-ms-transform: rotateZ(360deg);
-o-transform: rotateZ(360deg);
transform: rotateZ(360deg);
}
}
.keepRotatingOne {
-webkit-animation-name: rotate;
-o-animation-name: rotate;
animation-name: rotate;
-webkit-animation-duration: 3s;
-o-animation-duration: 3s;
animation-duration: 3s;
-webkit-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
}
The issue I'm facing is with the rotation of the outermost ring in my SVG. Instead of rotating in place, it's moving away from its original position. To view the problem, check out this FIDDLE LINK.
Interestingly, when I apply the same animation to a div
element, everything works perfectly fine. Here's an example showing the correct behavior: SEE HERE.
I'm puzzled as to why the animation isn't working on the SVG. Can anyone shed some light on this and provide a workaround solution?