Submitted over 2 years ago
I made a card and arrange its items using flex box.
@almero0922
Design comparison
SolutionDesign
Solution retrospective
I find difficult to arrange both images one on top of the other and managing its opacity. The part where I manage position to set up the hover image.
Community feedback
- @dostonnabotovPosted over 2 years ago
Hi, there. You can add an eye icon and background-color, using pseudo-elements. For example, in
.card::before
, you addbackground-color
, and in.card::after
, you add your icon asbackground-image
. You have to make sure that both are set theiropacity
to 0. When hovered, in.card:hover::before
and.card:hover::after
, you addopacity
to make it visible. You can view my solution as well if you want where I used this strategy.Marked as helpful1
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