Design comparison
SolutionDesign
Solution retrospective
Had trouble figuring out how to overlay color over an image. Responsiveness is pretty good
Community feedback
- @MelvinAguilarPosted over 1 year ago
Hello there ๐. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
- You can use the
<picture>
tag when you have different versions of the same image ๐ผ. Using the<picture>
tag will help you to load the correct image for the user's device saving bandwidth and improving performance. You can read more about this here ๐.
-
The
alt
attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.If you want to learn more about the
alt
attribute, you can read this article. ๐.
- To recreate the exact purple color of the image you can do the following:
Explanation:.column2 { background-color: rgb(171, 92, 219); } .image--header { mix-blend-mode: multiply; opacity: 0.75; }
- The first style sets the background color of the container element to a specific shade of purple.
- 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.
- Finally, the opacity property is set to
0.75
, which means that the image is slightly transparent, allowing some of the background color to show through.
I hope you find it useful! ๐
Happy coding!
Marked as helpful0@PickleRiccPosted over 1 year ago@MelvinAguilar Wow !! Thanks so much this was so helpful.
0 - You can use the
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