Stats preview card component
Design comparison
Solution retrospective
Solution for challenge stats preview card component
Community feedback
- @AdrianoEscarabotePosted almost 2 years ago
Hi Abdullahi Abdiaziz yusuf, how are you? I really liked the result of your project, but I have some tips that I think you will enjoy:
The hero image has a color slightly different from the Figma design, if you want to match the color you can reach this using
mix-blend-mode
withmix-blend-mode: multiply;
. The multiply will make the image blend the div background and the opacity will make the image less evident and improve the blend between image/purple div. See the code below:img { mix-blend-mode: multiply; opacity: 0.8; }
avoid using
px
, If your web content font sizes are set to absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. if you want to keep using px for development and then format the whole code to rem, you can use this vscode extension: px to remThe rest is great!
I hope it helps... 👍
Marked as helpful1 - @catherineisonlinePosted almost 2 years ago
Hey, for the image to match the color, I did something like this, I hope that helps, size might not fit your solution but you can adapt it depending on your own code:
<div class="image-container"> img class="main-image" src="images/image-header-mobile.jpg" alt=""> </div> .image-container { display: inherit; position: relative; width: 100%; border-radius: 0 10px 10px 0; background-color: hsl(277, 64%, 61%); } .main-image { width: 100%; height: 100%; position: relative; background-size: cover; border-radius: 0 10px 10px 0; mix-blend-mode: multiply; opacity: 0.75; }
IF THIS WAS HELPFUL PLEASE MARK IT AS HELPFUL 🤩
0
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