You extract the css3 animation attribute and write it into a css class name rule, and then add the class name to the page when clicked. As for judging the end of the animation, you can set a timer with the same duration as the animation. It will start when the animation plays and execute the callback when it ends.
Try animated events~~~
For example:
You extract the css3 animation attribute and write it into a css class name rule, and then add the class name to the page when clicked.
As for judging the end of the animation, you can set a timer with the same duration as the animation. It will start when the animation plays and execute the callback when it ends.