<header>
  <div class="header__bg"></div>
  <h1>Intestazione transform-skew</h1>
</header>

<section>
  <h1>Sottotitolo sezione</h1>
</section>
header {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.header__bg {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(#7893e6, #314da3);
  transform: skewY(-6deg);
  transform-origin: top left;
}

h1 {
  margin: 0;
  padding: 100px 0;
  font: 44px "Arial";
  text-align: center;
}

header h1 {
  position: relative;
  color: white;
}



Resources1×0.5×0.25×Rerun

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.