Submitted 11 months agoA solution to the Product preview card component challenge
Product preview
vite
P
@emawid

Solution retrospective
What challenges did you encounter, and how did you overcome them?
- First I used srcset to load the images but it required a page refresh to change the image when going back and forth between mobile and desktop. Solved problem with <picture>.
- Implemnted the cart icon as a background image which was very neat but struggled to position it at first before i found background-position with a relative (%) offset from left.
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on emawid's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord