Design comparison
SolutionDesign
Solution retrospective
I want to know how to make an image overlay with CSS like in the design. Thank you very much
Community feedback
- @MelvinAguilarPosted about 1 year ago
Hello there π. Good job on completing the challenge !
- To recreate the exact purple color of the image you can do the following:
.picture { β β β background-color: rgb(171, 92, 219); } .work-photo { β β . . . display: block; /* <---- Add this to remove the space created below the image*/ β β β β/* opacity: 0.4; <---- Update this*/ /* background-color: hsl(277, 64%, 61%); <---- Remove this*/ β β β βopacity: 0.75; β β β βmix-blend-mode: multiply; }
- The second style applies a blending effect to the image by setting the
mix-blend-mode
property to multiply. This means that the image will blend with the background color in a way that multiplies the color values of each pixel.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful1
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