Refire CSS animation with javascript after a previous one is complete
问题 I was trying to use the new animate() function to refire a CSS animation. I'm using Chrome 48 but I wonder if this is even possible right now. The animation should be just a growing and shrinking square. I've tried several things, as you can see, but none worked: var elem = document.querySelector(".box"); document.addEventListener("click", function() { elem.classList.add("close"); elem.animate(); //not working elem.animate("grow"); //not working elem.animate([{ transform: 'scale(1)' }, {