I am trying to use mix-blend-mode to create a background with a multiply effect overlay that also reveals part of the background. I also need the child content not to be affected by the blend mode. Like this:
I've tried setting the blend-mode to unset, I've also tried using isolation / isolate but can't seem to get that option to work. I don't want to use pseudo elements or placing the content outside of the parent element as the actual layout from the designer has a lot of content and I need it to be responsive.
What I've been able to get working so far: I can get the background and overlay working but the affect applies to the content layer also: https://codepen.io/orlafitz/pen/JVRQpM
.bkg-image {
background-image: url(https://poppyvine.com/wp-content/uploads/2019/04/beach-bw.jpg);
text-align: center;
padding: 100px 0px;
background-size: cover;
background-position: center;
}
.multiply-overlay {
background-color: #323ff0;
mix-blend-mode: multiply;
padding: 50px
}
.bkg-image .content {
color: #fff;
isolation: isolate;
}
<div class="bkg-image">
<div class="multiply-overlay">
<div class="content">
<h1>Margins to show bkg img<br>&<br>Content unaffected by blend mode</h1>
</div><!-- content -->
</div><!-- multiply-overlay-->
</div><!-- bkg img -->
Does anyone know if it is possible to achieve this?