lamoo7
KPCKevin Powell - Community
ā¢Created by lamoo7 on 11/3/2024 in #front-end
Need Help: Combining Gradient and Image Backgrounds on a Single Element
I am currently working with five elements, each having its own distinct background image. However, I need all of them to feature the same gradient overlay. I attempted to set this up as follows:
Unfortunately, this approach requires me to include the $gradient-overlay variable in each individual image class, which is not ideal.
My HTML structure is as follows:
I also tried applying the gradient directly to the
.box
class, but this method did not yield the desired effect, even with the use of background-blend-mode: multiply
.
I would like the result to display the image fully covered by the gradient, giving it a subtle overlay effect. However, Iām struggling with the correct syntax or approach to achieve this in my styles.
Codepen for refference: https://codepen.io/lamoo7/pen/rNXKPpg5 replies