A brief discussion on the callback processing method of CSS3 animation

高洛峰
Release: 2017-03-07 11:59:37
Original
1128 people have browsed it

When we do js animation, we often need to do callback processing, such as triggering an event after one animation is completed, executing another animation after one animation is completed, etc., but can it be captured when using CSS3 animation? What about callback processing for motion status?

CSS3 animation can also be processed with callbacks. It is divided into two attributes, one is transition [w3c document] and the other is animation [w3c document].

1. Transition

For transition, you can listen to the transitionend event and trigger it when the animation is completed. You can use it like this:




    
    css3-transitionend - BeyondWeb
    
    

Copy after login

2. animation

For animation we can listen to the animationend event, the sample code is as follows:




    
    css3-animationend - BeyondWeb
    
    

Copy after login

is about some content about CSS3 animation callback processing. It was recently used when making H5 pages. Let’s summarize.

The above article briefly discussing the callback processing of CSS3 animation is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.

For more articles related to the callback processing method of CSS3 animation, please pay attention to the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!