This is a solution to the NFT preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover states for interactive elements
- Solution URL: Add solution URL here
- Live Site URL: live site URL
- Semantic HTML5 markup
- CSS Flexbox
while working through this project i find it difficult to apply hover state to the image. finallay i found another CSS property which is background-image and i found another way to use color in css which is HSLA color. This my solution looks like this:
.overlay:hover{
background-image: url(./images/icon-view.svg);
background-repeat: no-repeat;
background-position-x: center;
background-position-y: center;
background-color: hsla(178, 100%, 50%, 0.5);
}
- CSS background-image property - This helped me This helped me explore css background-image property. I really liked this website and will use it going forward.
- CSS color - This is helped me to implement the opacity using HSLA color.
- Frontend Mentor - @MuhammadTatma
- Twitter - @MuhammadTatma