
Design comparison
Solution retrospective
I tried to use picture element and but it didn't work. How to use it?
Please log in to post a comment
Log in with GitHubCommunity feedback
- @KevinBlyweert
Great, can hardly tell the difference! For picture element, which you made me discover, you got two elements, source, and image. As I understood, in the field media of source element is an evaluation of what you want to be tested to display either of your images. If it's true, the image you linked into srcset will be displayed, otherwise the src from img element will. I played with media queries instead of picture element, maybe I'll give it a try later.
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