Rotate transform the element by using y-axis with CSS3


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

Example

Live Demo

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

Updated on: 29-Jun-2020

77 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements