JSFiddle - React, Tailwind, and code Playground

by Christian Sonne

HTML

<div id="elephant">
  <h1>Wild life</h1>
  <h2>Adventure in the forest</h2>
</div>

CSS

html, body {
  margin: 0;
  padding: 0;
}

#elephant {
  width: 100vw;
  height: calc(100vw * calc(848 / 1272));
  background: url(https://assets.nrdc.org/sites/default/files/styles/full_content--retina/public/media-uploads/wlds43_654640_2400.jpg?itok=LbhnLIk9) center center / contain;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

#elephant:after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0; right: 0;
  background: inherit;
  clip-path: polygon(59.95% 21.06%, 61.21% 21.79%, 62.35% 23.12%, 63.95% 21.99%, 66.22% 21.37%, 72.02% 22.17%, 77.8% 25.78%, 80.97% 30.08%, 83.41% 35.87%, 82.74% 38.67%, 82.12% 40.03%, 81.18% 43.05%, 79.24% 47.91%, 76.91% 50.21%, 75.41% 51.26%, 74.32% 52.83%, 71.24% 54.05%, 68.15% 54.77%, 65.94% 54.5%, 66.34% 57.27%, 66.69% 60.93%, 66.08% 63.16%, 66.49% 66.63%, 66.83% 70.23%, 66.74% 74.61%, 65.55% 76.25%, 63.92% 75.76%, 64.68% 73.77%, 64.67% 70.9%, 63.82% 65.59%, 62.71% 68.56%, 61.96% 72.86%, 61.57% 83.59%, 61.27% 93.6%, 56.51% 94.15%, 55.02% 80.6%, 54.07% 71.45%, 52.88% 68.42%, 51.74% 67.19%, 51.1% 69.49%, 50.58% 76.06%, 50.81% 78.6%, 52.27% 79.99%, 50.41% 81.21%, 48.63% 79.3%, 48.32% 74.43%, 48.67% 70.97%, 49.51% 63.68%, 48.57% 62.13%, 46.62% 60.75%, 42.51% 57.27%, 37.62% 53.61%, 34.31% 51.86%, 32.78% 49.09%, 31.23% 43.58%, 31.34% 37.8%, 32.7% 33.78%, 34.92% 28.9%, 39.09% 25.31%, 43.44% 23.76%, 49.75% 22.82%, 50.84% 24.05%, 53.47% 22.79%);
}

h1 {
  color: white;
  font-size: 18vw;
  text-transform: uppercase;
  padding-top: 1em;
  margin: 0;
  text-shadow: 0 0 5px rgba(0,0,0,0.4);
}

h2 {
  --letter-spacing: 2.5vw;
  color: white;
  z-index: 2;
  width: 93%;
  font-size: 2.2vw;
  text-transform: uppercase;
  text-align: justify;
  text-align-last: justify;
  letter-spacing: var(--letter-spacing);
  padding-left: var(--letter-spacing);
  margin-top: -1em;
  text-shadow: 0 0 5px rgba(0,0,0,0.4);
}