Hello,
In one of my projects I wanted an image to be the background for one of my div elements but I also wanted that picture to be darker than it originally is. I still haven’t figured out how to do it because I want just the background to be darker and not other things inside that div and the code that I used made everything inside it darker. So my question is, is there any way to apply darkening to my background image only without affecting other elements inside that div.
Thanks in advance!
.my-div {
background-image: url(myimage.jpg);
/* then probably some background positioning stuff */
background-color: /* some colour */;
background-blend-mode: multiply;
}
2 Likes