Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Stats Preview Card Using HTML and CSS

Anthony Nguyenβ€’ 80

@AnthonyPA0902

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

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

@MelvinAguilar

Posted

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 helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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