Design comparison
SolutionDesign
Community feedback
- @BobbypaulPosted over 2 years ago
HI good evening, Nice work, please how did you make the nft pic change to that blue eye when hovered.
0@hspolatPosted over 2 years ago@Bobbypaul hi, thanks. The overlay class has opacity property. İts value is 0. İf you hover on overlay class, the opacity will change to 1. So the overlay class will be visible. Here is the overlay class:
.overlay {
position: absolute; top: 0; left: 0; bottom: 4px; right: 0; background-image: url('/images/icon-view.svg'); background-repeat: no-repeat; background-position: 50% 50%; background-color: hsla(178, 100%, 50%, 0.5); opacity: 0;
}
This tutorial is good to understand the overlay topic.
You can find more details about code in dev tools. For this, you must use right click > inspect combination on the web page.
1
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