Rotate transform the element by using z-axis with CSS3


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

Example

Live Demo

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

Output

seetha
seetha

e

Updated on: 30-Jun-2020

121 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements