Design comparison
SolutionDesign
Solution retrospective
I can't add the cover color on the image . can anyone help me
Community feedback
- @vanzasetiaPosted over 3 years ago
👋Hi Chandra Shekhar Pawar!
My recommendation to add the purple overlay is by using
background-blend-mode
. So, I will guide you.- HTML
<div class="parent"></div>
- CSS, you need to add
height
in order for the image to show up.
.parent { height: 22rem; background-image: url('path/to/image.jpg'); background-repeat: no-repeat; background-color: hsl(244, 38%, 16%); background-blend-mode: multiply; }
That's it! Hopefully this is helpful!
Marked as helpful0 - @dannebrobPosted over 3 years ago
Have you tried to put the image in another div with a solid background color and change the opacity of the img?
Marked as helpful0
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