<section class="hero-decor">
  <h2>Hero title</h2>
  <p>A bit of a description content in here.</p>
  <img class="decor decor-1" src="https://i.ibb.co/Sx4xfZ8/dots.png" alt="" />
  <img class="decor decor-2" src="https://i.ibb.co/Sx4xfZ8/dots.png" alt="" />
</section>
.hero-decor {
  position: relative;
  min-height: clamp(250px, 50vmax, 500px);
  background-color: #f0f0f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;

  .decor {
    position: absolute;
    width: 200px;
    object-fit: cover;
    opacity: 0.5;
  }

  .decor-1 {
    top: 0;
    left: clamp(-8rem, -10.909rem + 14.55vw, 0rem);
  }

  .decor-2 {
    bottom: 0;
    right: clamp(-8rem, -10.909rem + 14.55vw, 0rem);
  }

  h2 {
    font-weight: bold;
    font-size: clamp(1.5rem, 0.5rem + 4vw, 2rem);
  }

  p {
    font-size: clamp(1rem, 0.25rem + 2vw, 1.25rem);
    color: #727272;
  }
}
*,
*:before,
*:after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 3rem 0;
}
View Compiled
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.