Home
CSS
CSS 3D Transforms
Tryit: The rotateZ() method
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div { width: 300px; height: 100px; background-color: yellow; border: 1px solid black; } #myDiv { transform: rotateZ(90deg); } </style> </head> <body> <h1>The rotateZ() Method</h1> <p>The rotateZ() method rotates an element around its Z-axis at a given degree.</p> <div> This a normal div element. </div> <div id="myDiv"> This div element is rotated 90 degrees. </div> </body> </html>