Course Recommendation:
- Previous Page CSS rotateX() function
- Next Page CSS rotateZ() function
- Go to the Previous Level CSS Function Reference Manual
CSS rotateY() Function
Definition and Usage rotateY()
CSS
rotateY()
The function defines the 3D rotation of the element around the y-axis (vertical direction). transform
Used in properties.
Example
Example 1
Using rotateY()
Rotate multiple <div> elements around the y-axis (vertical direction):
#myDiv1 { transform: rotateY(40deg); } #myDiv2 { transform: rotateY(60deg); } #myDiv3 { transform: rotateY(80deg); }
Example 2
Using rotateY()
Rotate images around the y-axis (vertical direction):
#img1 { transform: rotateY(40deg); } #img2 { transform: rotateY(60deg); } #img3 { transform: rotateY(80deg); }
CSS Syntax
rotateY(angle)
Value | Description |
---|---|
angle |
Required. Specify the rotation angle. Possible units:
|
Technical Details
Version: | CSS Transforms Module Level 2 |
---|
Browser Support
The numbers in the table represent the browser version that first fully supports this function.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
12 | 12 | 10 | 4 | 15 |
Related Pages
Tutorial:CSS 3D Transformation
Reference:CSS transform attribute
Reference:CSS rotate property
Reference:CSS rotate() function
Reference:CSS rotate3d() function
Reference:CSS rotateX() function
Reference:CSS rotateZ() function
- Previous Page CSS rotateX() function
- Next Page CSS rotateZ() function
- Go to the Previous Level CSS Function Reference Manual