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: Frontend Mentor | Product preview card component
- Live Site URL: Product preview card component
- Flexbox
- Desktop-first workflow
I used picture tag to set different images for different screen sizes.
<picture>
<source srcset="images/image-product-mobile.jpg" media="(max-width: 375px)" />
<img class="image" src="images/image-product-desktop.jpg" alt="" />
</picture>
I have some problems with responsive design. so I will foucus on it on the next challenges.
- The Picture element - This helped me to get useful information about picture tag in html.