Design comparison
SolutionDesign
Solution retrospective
This was a really fun challenge.
The main points are:
- HTML <picture>: dynamically change the image's source;
- CSS Position: position the correct image's locations;
- CSS Object-fit, Object-position, Overflow: configure the images;
- JavaScript element.addEventListener: JavaScript is confusing, so I made the simplest way I figured out. Probably there's a cleaner way to code but it'd take too much time for such task.
I'll take a break until next week to settle all this knowledge and to rest.
Wish you all the best.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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