Run
❯
Run Code
Ctrl+Alt+R
Save Code
Ctrl+Alt+A
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
<!DOCTYPE html> <html> <head> <style> div { width: 150px; height: 150px; background-color: yellow; border: 1px solid black; } #myDiv { transform: rotate(-20deg); } </style> </head> <body> <h1>The rotate() Method</h1> <p>The rotate() method rotates an element clockwise or counter-clockwise.</p> <div> This a normal div element. </div> <div id="myDiv"> This div element is rotated counter-clockwise with 20 degrees. </div> </body> </html>