Design comparison
Solution retrospective
Please instruct how to add a colour in hover state ? I am not able to do it
Community feedback
- @yashviradiaPosted almost 2 years ago
Hi @SonuKr95!
Firstly, great work on this project!
-
To create hover effect with
view-icon
and in your case adding color to hover, I used one more emptydiv
to create overlay effect,view-icon
being on top ofcard-image
. -
For this concept of css-positioning and z-index will be useful.
-
In your case, make
view-icon
as newimg
element and also an emptydiv
which will give background color effect toview-icon
. -
Give
view-icon
and emptydiv
absolute positioning withcard-image
having relative positioning. Also give first two elements z-index of 1 and 2 respectively.
Hope that helps. Give it a try and let me know!
Marked as helpful0@SonuKr95Posted almost 2 years agoHi @yashviradia
Thanks for the feedback, I completed the challenge by adding hover effect on main image
0@SonuKr95Posted almost 2 years agoHi @yashviradia
Thanks for the feedback, I completed the challenge by adding hover effect on main image
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