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
- Semantic HTML5 markup
- CSS
- Bootstrap
- CSS Grid
- Mobile-first workflow
- Sass
For this project, I wanted to rely more on Bootstrap's spacing utilities, which helped remove the uncertainty of which properties to use.
<h2 class="mx-3 pb-auto"><span class="heading">Equilibrium #3429</span></h2>
I also used the mix-blend-mode to bring out the view icon on the hover state.
.overlay:hover {
opacity: 70%;
mix-blend-mode: screen;
}
One area I had trouble with was applying a hover effect to the image. I looked up many different ways to apply an overlapping color to an image, but none of them achieved the effect that I was looking for. So I ended up just using the mix-blend-mode CSS property to create a similar effect.
- Bootstrap Spacing - I relied more on using Bootstrap's spacing utilities to apply proper spacing to each element.