How to use CSS to implement an example of a circular motion ball

Source: Internet
Author: User

We often see some animated effects on the page, many of which can be implemented by CSS only.

Here we use the animation attribute of the CSS3.

The animation property is a shorthand property for setting six animation properties:
ANIMATION-NAME Specifies the keyframe name to bind to the selector.
Animation-duration specifies the time, in seconds or milliseconds, that the animation will take to complete.
animation-timing-function Specifies the speed curve of the animation.
ANIMATION-DELAY specifies the delay before the animation begins.
ANIMATION-ITERATION-COUNT specifies the number of times the animation should play.
Animation-direction Specifies whether the animation should be rotated in reverse.
Note: Always specify the Animation-duration property, otherwise the duration is 0 and the animation will not play.

Animation:name Duration timing-function delay iteration-count direction;

example: A small ball that makes a circular motion. Below is the relevant code, we can make corresponding changes on this basis.

<! DOCTYPE Html>
Related Article

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.