Rotate transform the element by using x-axis with CSS3


Use the rotateX(angle) method to rotate transform the element by using x-axis with CSS3 −

Example

Live Demo

<html>
   <head>
      <style>
         div {
            width: 200px;
            height: 100px;
            background-color: pink;
            border: 1px solid black;
         }
         div#myDiv {
            -webkit-transform: rotateX(150deg);
            /* Safari */
            transform: rotateX(150deg);
            /* Standard syntax */
         }
      </style>
   </head>
   <body>
      <div>
         tutorialspoint.com
      </div>
      <p>Rotate X-axis</p>
      <div id = "myDiv">
         tutorialspoint.com
      </div>
   </body>
</html>

Updated on: 29-Jun-2020

162 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements