CSS3 rotate3d() method Examples




CSS3 rotate3d() method Examples

<!DOCTYPE html>
<html>
   <head>
      <title>CSS3 rotate3d() Method</title>
      <style type="text/css">
         .container{
            margin: 50px;
            width: 125px;
            height: 125px;
            perspective: 300px;
            border: 4px solid #a2b058;
            background: red;
         }
         .transformed {
            -webkit-transform: rotate3d(0, 1, 0, 60deg);
            transform: rotate3d(0, 1, 0, 60deg);
         }
      </style>
   </head>
   <body>
      <h2>Before Rotation:</h2>
      <div class="container">
         <img src="css3.jpg" alt="CSS3">
      </div>
      <h2>After Rotation:</h2>
      <div class="container">
         <img src="css3.jpg" class="transformed" alt="CSS3">
      </div>
   </body>
</html>

Output