Design comparison
Solution retrospective
Hello!
Does anyone know how to add a color overlay as seen in the model solution?
I've been searching around and trying but it's not working :(
Many thanks!
Community feedback
- @1Hanif1Posted over 3 years ago
So the step I used for getting the purple overlay on image First I set the Image container's background color as purple - "background-color: hsla(277, 64%, 61%,0.8);" Then I applied mix blend mode property on the image itself and set it to 'multiply'. "mix-blend-mode: multiply;" - which basically blends the image with background color of the container
Check this page: https://www.w3schools.com/cssref/pr_mix-blend-mode.asp
Hopefully this helps :)
0 - @PanuGrPosted over 3 years ago
Hi. There are few ways...a div with color and z-index, with the :after pseudoselector. Recently I found out about the blend-mode. I think it is better than other methods.
I found 2 different properties: https://www.w3schools.com/cssref/pr_background-blend-mode.asp
https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord