Talking about the callback processing method of CSS3 animation

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.