Design comparison
SolutionDesign
Solution retrospective
I had to use JS to change the images. Is there any other way to get it? And what about the desing, Any sugest?
Community feedback
- @adelinejunePosted about 3 years ago
Hi Matias
to change the image depending on the screen size you can use the <picture> tag here is an example of picture tag in HTML
<picture> <source media="(min-width: 750px)" srcset="./images/desktop/image-graphicdesign.jpg"> <img src="./images/mobile/image-graphic-design.jpg" alt="transform-img"> </picture>you can head over to stack overflow (https://stackoverflow.com/questions/30460681/changing-image-src-depending-on-screen-size) for more information
Hope it helps !! 😆
Marked as helpful0
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