This is a solution to the NFT preview card component challenge on Frontend Mentor.
Users should be able to:
- View the optimal layout depending on their device's screen size
- See hover states for interactive elements
- Solution URL: https://www.frontendmentor.io/solutions/nft-preview-card-component-rkrAJ9N79
- Live Site URL: https://yashviradia.github.io/nft-preview-card-component-main/
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- working this project with help of CSS Flexbox.
- create image hover overlay effects using CSS
- Using z-index.
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
opacity: 0;
transition: 0.5s ease;
border-radius: 10px;
background-color: hsl(178, 100%, 50%);
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 1;
}
- Using HTML psuedo Elements to create hover effect on card image.
- Blog describing the process of building this project.
- Flexbox Explanation on MDN - This is an amazing documentation on CSS Flexbox which helped me finally understand this concept. I'd recommend it to anyone still learning this concept.
- Website - Yash Viradia
- Frontend Mentor - @yashviradia
- Twitter - @theyashviradia
- Detailed review from Grace Snow on Slack.
- Feedback from Michael Bishop on Frontend Mentor.