Skip to content

Instantly share code, notes, and snippets.

@joshapgar
Created September 14, 2018 13:13
Show Gist options
  • Save joshapgar/b09ed97535afffcefc95dec9dec6744b to your computer and use it in GitHub Desktop.
Save joshapgar/b09ed97535afffcefc95dec9dec6744b to your computer and use it in GitHub Desktop.
Text with mix-blend-mode background
.bg {
background-image: url('https://images.unsplash.com/photo-1501706362039-c06b2d715385?auto=format&fit=crop&w=1070&q=60&ixid=dW5zcGxhc2guY29tOzs7Ozs%3D');
background-repeat: no-repeat;
background-position: center center;
padding: 100px 50px;
}
.text {
position: relative;
}
.text:before {
content: "";
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: #ed1c24;
mix-blend-mode: multiply;
z-index: 0;
}
.text p {
font-family: "Helvetica";
font-weight: bold;
font-size: 32px;
color: #fff;
margin: 0;
padding: 40px;
z-index: 2;
position: relative;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment