Skip to content

Instantly share code, notes, and snippets.

@clickstudio
Last active September 10, 2019 01:11
Show Gist options
  • Save clickstudio/95f0c8564d12e328a69b46d9682bfbec to your computer and use it in GitHub Desktop.
Save clickstudio/95f0c8564d12e328a69b46d9682bfbec to your computer and use it in GitHub Desktop.
<div class="slider" style="background-image: url(https://www.fillmurray.com/640/360);">
<div class="text-container">
<h1 class="header1">This is a Header</h1>
<p class="paragraph">Regular Body Text</p>
</div>
</div>
.slider {
background: url('../../images/hero-bg.jpg');
background-color: blue;
position: relative;
display: flex;
align-items: center;
background-position: center 66%;
background-repeat: no-repeat;
background-size: cover;
padding-left: 5rem;
padding-right: 5rem;
&:before {
display: block;
content: "";
padding-top: 47%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment