Rotate div to -20 degrees angle with CSS

CSSWeb DevelopmentFront End Technology

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
raja
Published on 02-May-2018 12:05:23
Advertisements