Use the rotateX(angle) method to rotate transform the element by using x-axis with CSS3 −
Example
<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>