JSFiddle - React, Tailwind, and code Playground

by Marc Hjorth

HTML

<section class="palm-section text-center" id="palm-section">
    <div class="palm-img">
        <h1>Palm Hotel</h1>
        <div class="break-line"></div>
    </div>
</section>

CSS

.palm-img h1{ /* Child text to background */
  position: absolute;
  top: 0;
  padding-top: 10px;
  font-size: 62px;
  color: white;
  font-weight: 400;
}


.palm-img{ /* Background */
  position: relative;
  width: 100%;
  padding-top: 150px;
  padding-bottom: 100px;
  height: 100%;
  background: linear-gradient( rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5) ), url(https://images.pexels.com/photos/531880/pexels-photo-531880.jpeg?cs=srgb&dl=cold-vehicles-water-531880.jpg&fm=jpg) no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  color: white;
  background-size: cover;
}