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
Version mobile:
Version desktop :
- Solution URL: https://www.frontendmentor.io/solutions/product-preview-card-component-solution-oSpT7Bsz5t
- Live Site URL: https://c-costin.github.io/product-preview-card-component/
- Semantic HTML5 markup
- BEM CSS Method
- Mobile-first workflow
- Flexbox
I learned, use multiple image via the <picture></picture>
markup
<picture>
<source media="(max-width:640px)" srcset="image.jpg">
<source media="(min-width:640px)" srcset="big-image.jpg">
<img src="defaut/image.jgp" alt="Image description" style="width:auto">
</picture>
- MDN Web Docs - This helped me for use markup
<picture></picture>
- Website - costincadeau.fr
- Frontend Mentor - @c-costin