Your current usage of background-blend-mode
on the img
element is blending multiple background images or colors applied to the same element.
To blend arbitrary elements that are stacked, you should utilize mix-blend-mode
instead. Specifically, in this scenario, apply mix-blend-mode
to the topmost element with the class .overlay
.
#container {
height: 800px;
background-color: blue;
}
#photo img {
position: absolute;
}
.overlay {
color: red;
position: relative;
bottom: -200px;
font-size: 600px;
text-transform: uppercase;
transition: transform 1s ease-in-out;
mix-blend-mode: overlay;
}
<div id="container">
<div id="photo">
<img src="https://www.example.com/image.jpg" />
</div>
<div class="overlay">A</div>
</div>