@correlucas
Posted
👾Hello @susiku, congratulations on your solution!
Nice code and nice solution! You did a good job here putting everything together. I’ve some suggestions for you:
1.To get closer to overlay effect
on the photo as the Figma Design its better you use mix-blend-mode
. All you need is the div
under the image
with this background-color: hsl(277, 64%, 61%);
and apply mix-blend-mode: multiply
and opacity: 80%
on the img
or picture
selector to activate the overlay blending the image with the color of the div. See the code bellow:
img {
mix-blend-mode: multiply;
opacity: 80%;
}
Here's a good article explaining these effects with mix-blend-mode: https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode
2.A better way to work this solution image, the product image is by using <picture>
to wrap it on the html instead of using it as <img>
or background-image
(with the css). Using <picture>
you wrap both images (desktop and mobile) and have more control over it, since you can set in the html when the images changes setting the screen size for each image.ote that for SEO / search engine reasons isn’t a better practice import this product image with CSS since this will make it harder to the image.
Here’s the documentation and the guide to use this tag:
https://www.w3schools.com/tags/tag_picture.asp
3.I saw that for some properties you’ve used rem
and for others px
. In this case, it is better to use only one kind of unit to have a better organization for your code. relative units
as rem
or em
have a better fit if you want your site more accessible between different screen sizes and devices. REM
and EM
does not just apply to font size, but to all sizes as well.
✌️ I hope this helps you and happy coding!
Marked as helpful