This is a solution to the Product 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 and focus states for interactive elements
- Solution URL: Preview Card
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
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:
Below is the code I used to change the image according to the user's screen size.
<img srcset="images/image-product-desktop.jpg 600w, images/image-product-mobile.jpg 686w"
sizes="(max-width: 600px) 686px, 300px" src="images/image-product-desktop.jpg"
alt="Perfume Gabrielle Chanel Paris">
This CSS snippet was used to import external fonts into my web site.
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Montserrat:wght@500;700&display=swap');
Worrying again about the responsiveness of the site, in the CSS file, I used @media to work with different configurations for screens of different proportions.
@media only screen and (max-width: 600px) {}
- Frontend Mentor - @LucasDeSousaR
- Twitter - @LucasDeSousaR