When we do JS animation, often need to do callback processing, such as an animation after the completion of an event, an animation after the completion of another animation and so on, but in the use of CSS3 animation can not capture the state of motion to do callback processing it?
CSS3 animation can also do callback processing, which is divided into two properties, one is the TRANSITION[W3C document], and the other is ANIMATION[W3C document].
1, transition
For transition, you can listen to the Transitionend event, which is triggered when the animation is complete, so you can use:
<! DOCTYPE html>
2, animation
For animation we can listen to the Animationend event, the sample code is as follows:
<! DOCTYPE html>
is about CSS3 animation callback processing some of the content, recently in doing H5 page used, summed up.
This article on the CSS3 animation callback processing is a small part of the whole content to share to everyone, I hope we can give you a reference, but also hope that we support a lot of topic.alibabacloud.com.