Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save codezxc/756a2326dd63aadbd5323fcdbd93d04c to your computer and use it in GitHub Desktop.
Save codezxc/756a2326dd63aadbd5323fcdbd93d04c to your computer and use it in GitHub Desktop.
Background image gradient overlay
<div class="bg-img"></div>
html, body {
width: 100%;
height: 100%;
}
.bg-img {
position: relative;
width: 100%;
height: 100%;
background: url('http://unsplash.it/1200x800') center center no-repeat;
background-size: cover;
&:before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-image: linear-gradient(to bottom right,#002f4b,#dc4225);
opacity: .6;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment