<header>
  <h1>Intestazione Clip-path</h1>
</header>

<section>
  <h2>Sottotiolo sezione</h2>
</section>
header {
  position: relative;
  height: 300px;
  background-image: linear-gradient(#7893e6, #314da3);
  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    0 calc(100% - 5vw)
  );
  /* change the calc height to a percentage height to get alternate responsive behavior*/
}

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

section {
  margin-top: -5vw;
  background-image: linear-gradient(135deg, #777, #111);
}



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.