Syntax error Rotate the element based on an angle using CSS

Rotate the element based on an angle using CSS



Let us learn how to rotate the element based on an angle

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

Updated on: 2020-06-21T05:14:45+05:30

249 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements