Rotate div to -20 degrees angle with CSS



You can try to run the following code to rotate div to -20 degrees angle with CSS −

Example

Live Demo

 <html> <head> <style> div { width: 300px; height: 100px; background-color: pink; border: 1px solid black; } div#myDiv { /* IE 9 */ -ms-transform: rotate(-20deg); /* Safari */ -webkit-transform: rotate(-20deg); /* Standard syntax */ transform: rotate(-20deg); } </style> </head> <body> <div> Tutorials point.com. </div> <div id = "myDiv"> Tutorials point.com </div> </body> </html> 

Output

CSS Rotate
Updated on: 2019-07-30T22:30:22+05:30

633 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements