Pure HTML5+CSS3 Making picture rotation

Source: Internet
Author: User
This article mainly introduces the pure HTML5+CSS3 production picture rotation, HTML5 combined with CSS3 to achieve some of the animation effects, the implementation is relatively easy, interested in the small partners can refer to

This example can be applied to many projects, very practical, I hope you can master.

As follows:

This effect is not really difficult to implement, the code listing is as follows:

xml/html Code copy content to clipboard

<!     DOCTYPE html>

1. The p with the ID Liu is the area to display the picture, but the picture here is the background image to use, and the rounded angle is used to achieve the circular effect.
2. The key part of the code is how to make the picture rotate infinitely. We can use the combination of-webkit-animation and @-webkit-keyframes to do it.

-webkit-animation is a composite property that is defined as follows:

-webkit-animation:name Duration timing-function delay iteration_count direction;

Name: Is the method that needs to be specified in @-webkit-keyframes to perform the animation.

Duration: The length of time the animation is executed in a cycle.

Timing-function: The effect of animation execution can be linear, or it can be "fast into slow speed out" and so on.

Delay: The duration of the animation delay execution.

Iteration_count: The number of times the animation loop executes, and if it is infinite, it executes indefinitely.

Direction: Animation execution direction.

3. The From and to two properties in @-webkit-keyframes specify the initial and end values for the animation execution.

4.-webkit-animation-play-state:paused; Pauses the execution of the animation.

The above is the whole content of this article, I hope to realize the image of the rotation effect of the help.

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.