@rileydevdzn
Posted
Hi! Congrats on completing the product preview card!
For this card, the image is more informative for the user and not decorative, it would be better to use an element (like <img>
or <picture>
) for this image instead of CSS background.
You are spot-on with your question about changing sources for the 2 images! Since the provided images are a full-size desktop image and cropped version for mobile, we're looking at the art direction problem. A great way to do this is with the <picture>
element, which uses the srcset
attribute. 😃
Marked as helpful
@CoconutDev13
Posted
@rileydevdzn Hey! Thank you for your response. I'll bear in mind picture and for sure I'll use it in my next attempt