It seems like I have come across an issue with a CSS animation that I can't find a solution for. The animation is supposed to loop infinitely, and while it is working, there is a problem.
// CSS
@keyframes myanim {
0% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
25% { transform: translate(5px, 5px) rotate(1deg) skewX(1deg); }
50% { transform: translate(0, 0) rotate(0eg) skewX(0deg); }
75% { transform: translate(-5px, -5px) rotate(-1deg) skewX(-1deg); }
100% { transform: translate(0, 0) rotate(0deg) skewX(0deg); }
}
// JS
element.style.animation = "myanim " + mytimer + "s infinite";
There seems to be an issue with keyframe interpolation, particularly at the beginning and end of the animation loop. Instead of maintaining a constant rhythm, the animation slows down, jitters, then speeds up again. Is there a way to make all keyframes interpreted in a circular manner for the animation loop to function as intended?