I have an good idea what the answer is going to be, but I just want to make absolutely sure.
I have two elements, div.glass
and div.sound
, both contain a background-image. Is it possible to set the blending mode to each div so that they interact with each other? For example:
div.glass,
div.sound {
width: 597px;
height: 154px;
position: absolute;
}
div.glass {
background: url(glass.png) 0 0 no-repeat;
z-index: 9;
top: 5px;
left: 5px;
}
div.sound {
background: url(soundwave.png) 0 0 no-repeat;
z-index: 10;
blend-mode: multiply;
top: 50px;
left: 300px;
}
div.container {
position: relative;
}
<div class="container">
<div class="glass"></div>
<div class="sound"></div>
</div>
You have 2 ways to use blend-modes
When doing it in the same element, the property is background-blend-mode.
But, when doing it with 2 elements. it is mix-blend-mode