CSS3 Animation animation, the delay between the loop to do how to get

Source: Internet
Author: User

when using CSS to do some small animation, some animations we need to play the loop, and in some of the animation we need to have a certain interval between the previous loop and the next loop, this time the Animation-delay and Transition-delay It only takes effect at the beginning of the first animation, and it doesn't work between the two loops, which is the time interval between loops that we need to implement in other ways.

Method: As the following program, we can set the total time for the animation to 4s, and then starting from 75%, with the back of the 1s to do the animation, the front 3s as the start of each animation before the delay, so that you can solve the cyclic delay failure problem.

div{

Animation:move 4s ease infinite;

}

@keyframes move{

75%{Transform:translatex (0px);}

100%{Transform:translatex (100px);}

}

CSS3 Animation animation, the delay between the loop to do how to get

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.