I'm facing a "problem" with CSS animations.
I have an SVG that is composed of multiple items that represent a face, eyes,eyebrows, hands and a notebook.
As you can imagine I am trying to animate those part of the SVG. I have 3 buttons that represent 3 type of animations. Those are CSS Keyframes that are added to the elements that need to be animated.
My problem : I am unable to run the same animation twice in a row while I am able to launch different types of animations one by one.
I found that "trick" that was supposed to "reset" the animations but that does not seem to work :
currItem.style.animation = 'none';
currItem.offsetHeight;
currItem.style.animation = null;
CSS animations are kind of new for me so I could miss some essential "requirements".
PS: I know my code is a bit ugly but I'm in a "sandbox" mode atm and am not trying to optimize my code.
Thanks.