Skip to content

erlanggaadptr/nft-preview-card-component-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - NFT preview card component solution

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.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size
  • See hover states for interactive elements

Screenshot

Links

My process

  1. Plan and outline the website
  2. Set up the project
  3. Add HTML5 semantic tags
  4. Add CSS custom properties
  5. Use Flexbox for layout
  6. Style the website
  7. Add hover transition for links
  8. Test and refine
  9. Deploy the website

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS ::before Selector
  • CSS Transitions
  • CSS :hover Selector

What I learned

  1. Using CSS ::before selector
.card .card-img .card-img-container .view-icon::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  background: var(--cyan);
  width: 100%;
  height: 100%;
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.5s ease;
}
  1. Using CSS transitions
.card .card-img .card-img-container .view-icon img {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card .card-img .card-img-container .view-icon:hover img {
  opacity: 1;
}
  1. Using CSS :hover selector
.card .card-img .card-img-container .view-icon::before {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.card .card-img .card-img-container .view-icon:hover:before {
  opacity: 0.5;
}

Continued development

As of the writing of this section, I have no areas that I want to continue focusing on more in future projects.

Useful resources

Author

Acknowledgments

I want to give a hat tip to W3Schools for providing guide on how to create image hover overlay effects.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published