What are the attributes used to achieve rotation effects in css3

青灯夜游
Release: 2022-03-22 19:47:04
Original
2337 people have browsed it

The attribute that achieves rotation effect in css3 is "transform". The transform attribute is used to apply a 2D or 3D transformation to an element. Rotation can be achieved when this attribute is used with the rotate(), rotate3d(), rotateX(), rotateY() or rotateZ() functions.

What are the attributes used to achieve rotation effects in css3

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

The attribute that implements the rotation effect in css3 is "transform".

The transform attribute is used to apply 2D or 3D transformation to the element. When this attribute is used with the following function, the element rotation can be achieved:

  • rotate(angle ) Define 2D rotation and specify the angle in the parameters.

  • rotate3d(x,y,z,angle) Define 3D rotation.

  • rotateX(angle) Defines a 3D rotation along the X-axis.

  • rotateY(angle) Defines 3D rotation along the Y axis.

  • rotateZ(angle) Defines 3D rotation along the Z axis.

Example 1:

     
Hello
Copy after login

What are the attributes used to achieve rotation effects in css3

Example 2:

     

CSS3 元素旋转

rotate(45deg)

rotateX(45deg)

rotateY(45deg)

rotateZ(45deg)

Copy after login

What are the attributes used to achieve rotation effects in css3

(Learning video sharing:css video tutorial)

The above is the detailed content of What are the attributes used to achieve rotation effects in css3. 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
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!