CSS Property Value How to - transform: skew(20deg);








Question

We would like to know how to transform: skew(20deg);.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.testClass {<!--from   ww w .  j av  a  2s. co  m-->
  width: 150px;
  height: 100px;
  -webkit-transform: skew(20deg);
  -moz-transform: skew(20deg);
  -o-transform: skew(20deg);
  transform: skew(20deg);
  background: red;
}
</style>
</head>
<body>
  <div class="testClass"></div>
</body>
</html>

The code above is rendered as follows: