Design comparison
SolutionDesign
Solution retrospective
The transition in images from mobile view to Desktop view.
Community feedback
- @fernandolapazPosted over 1 year ago
Hi π, regarding the transition in images that you mention:
- To show different images depending on the device or screen size, the
<picture>
element is ideal for that purpose:
<picture> <source media="(min-width: 768px)" srcset="images/image-product-desktop.jpg"> <img src="images/image-product-mobile.jpg" alt="description"> </picture>
I hope itβs useful, any questions don't hesitate π
Regards,
1@KofiastroPosted over 1 year ago@fernandolapaz Thank you so much.I had to use relative and absolute and invisible.But this method you provided is so simple.Thank you once again
0@fernandolapazPosted over 1 year ago@Kofiastro
You are welcome, I'm glad if it helped you : )
0 - To show different images depending on the device or screen size, the
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