Rotate div with skew x-axis using CSS


You can try to run the following code to rotate div with skew x-axis using CSS −

Example

Live Demo

<html>
   <head>
      <style>
         div {
            width: 300px;
            height: 100px;
            background-color: pink;
            border: 1px solid black;
         }
         div#skewDiv {
            /* IE 9 */
            -ms-transform: skewX(20deg);
            /* Safari */
            -webkit-transform: skewX(20deg);
            /* Standard syntax */
            transform: skewX(20deg);
         }
      </style>
   </head>
   <body>
      <div>
         Qries.com
      </div>
      <div id = "skewDiv">
         Qries.com
      </div>
   </body>
</html>

Updated on: 29-Jun-2020

98 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements