Home > Web Front-end > H5 Tutorial > How to achieve the animation effect of picture rotation in html5

How to achieve the animation effect of picture rotation in html5

不言
Release: 2018-06-11 17:50:17
Original
4236 people have browsed it

This article mainly introduces the animation effect of html5 to achieve image rotation - related information to make the page move. Friends who need it can refer to it

1. Take a look at the effect first:

How to achieve the animation effect of picture rotation in html5

2. The code is like this:

<img src="images/circle.png" alt="" id="circle"/>
@mixin ani-btnRotate{
    @keyframes btnRotate{
        from{transform: rotateZ(0);}
        to{transform: rotateZ(360deg);}
    }
}
@include ani-btnRotate;
#circle{
    position: absolute;
    left: 50%;
    width: REM(338);
    height:  REM(338);
    margin-top: REM(200);
    margin-left: REM(-338/2);
    transform-origin: center center ;
    animation: btnRotate 1s 1s linear forwards;
    }
Copy after login

Used The picture of Please pay attention to the PHP Chinese website for content!

Related recommendations:

How to achieve the animation effect of picture rotation in html5

How to use jQuery and HTML5 to achieve the special effect of changing clothes by shaking the phone

How to use canvas to implement press and hold Mouse movement draws a trajectory

#Using HTML5 How to draw polygons such as triangles and rectangles with Canvas

The above is the detailed content of How to achieve the animation effect of picture rotation in html5. For more information, please follow other related articles on 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