nilmus• 80
@nilmus
Posted
I see that to switch from the mobile-image to the desktop-image, you used display: none
inside your media query.
This works, but note there is a better solution by using the figure
element and giving it an img
and a source
, like so:
<figure
<source
media="(min-width: 1024px)"
srcset="images/image-product-desktop.jpg"
/>
<img
class="product-image"
src="images/image-product-mobile.jpg"
alt="perfume image"
/>
/>
Marked as helpful
0
Yosef Hayim• 210
@YosefHayim
Posted
@nilmus Thanks alot!
0
Yosef Hayim• 210
@YosefHayim
Posted
@nilmus Thanks alot!
0