@correlucas
Posted
👾Oi de novo Bernardo, tudo bem? Parabéns pelo desafio!
Duas dicas pra vc:
1.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
2.O CSS padrão vem com um monte de comportamentos que deixam o código dificil de configurar, por exemplo, margens, imagens, animações e etc. Usando esse CSS RESET, você vai salvar um bom tempo usar esse arquivo que já reseta a maioria das coisas como margens, imagens, animações e etc. Vai salvar um bom tempo usar isso desde o começo: https://piccalil.li/blog/a-modern-css-reset/
👋 Espero que essas dicas tenham sido úteis e continue codando!