Mouse over the elements below to observe the contrast between a 2D and a 3D transformation:
In this section, you’ll explore the following CSS attribute:
The numbers in the table indicate the initial browser version that fully implements the property.
The CSS transform property enables the utilization of the following 3D transformation methods:
The rotateX() method rotates an element around its X-axis by a specified degree.
Example
#myDiv { transform: rotateX(150deg); } |
The rotateY()
method rotates an element around its Y-axis at a given degree:
Example
#myDiv { transform: rotateY(150deg); } |
The rotateZ() method rotates an element around its Z-axis by a specified degree.
Example
#myDiv { transform: rotateZ(90deg); } |