@correlucas
Posted
👾Oi @robsongomes, tudo bem? Parabéns pelo desafio! Seja bem vindo a comunidade do Frontend Mentor
Acabei de ver sua solução e tenho umas dicas pra melhorar seu código/design:
A sua solução ficou muito boa, a estrutura html o design também,
algo que você pode fazer para melhorar a imagem que precisa mudar entre mobile e desktop é usar <picture>
ao invés de <img>
dentro de uma div. Por motivos de SEO e mecanismos de pesquisa tipo Google e bing, não é uma boa prática importar esta imagem do produto com CSS, pois isso dificultará a localização da imagem no google. Você pode gerenciar ambas as imagens dentro da tag <picture>
e usar o código html para definir quando as imagens devem mudar configurando o dispositivo max-width
dependendo do dispositivo (mobile / desktop) Aqui está um guia sobre como usar picture
: https://www.w3schools.com/tags/tag_picture.asp
Veja o exemplo abaixo:
<picture>
<source media="(max-width:650px)" srcset="./images/image-product-mobile.jpg">
<img src="./images/image-product-desktop.jpg" alt="Gabrielle Parfum" style="width:auto;">
</picture>
👋 Espero que essas dicas te ajudem e que você continue no foco!
Marked as helpful