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
- Solution URL: [https://www.frontendmentor.io/solutions/nft-preview-card-component-FGi7lUKkY]
- Live Site URL: [https://jialeee17.github.io/nft-preview-card-component/]
- HTML5
- CSS3
- Sass pre-processor
- Mobile-first workflow
- RWD Concept
Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.
To see how you can add code snippets, see below:
.nft-price {
color: $cyan;
font-size: 1.1rem;
font-weight: 600;
&::before {
content: url('../../images/icon-ethereum.svg');
margin-right: .3rem;
transform: translateY(2px);
}
}
I learned the use of ::before pseudo-element for adding icon. This is a flexible way for adding icon before any elements as you don't have to hardcode it into your html element tag.
In the upcoming projects, I'll focus on the use of SCSS to smoothen my development process. Other than that, I tried to do more advanced projects that are available on Frontend Mentor. For example, projects that included the use of advanced layout properties like flexbox or grid.
- Beautiful CSS box-shadow examples - This website provided lots of beautiful box-shadow that you can choose from. Awesome!