Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Flexbox card with image overlay using pseudo-element

@jvmdo

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I struggled in the desktop version because of the image sizing within the flexbox. I feel there is a better way to do it but I didn't found a good learning resource.

Community feedback

Lucas 👾 104,420

@correlucas

Posted

👾Oi João Oliveira, tudo bem? Parabéns pelo desafio!

Acabei de ver sua solução e tenho umas dicas pra melhorar seu código/design:

Para adicionar exatamente o mesmo efeito de sobreposição roxo para a imagem, combinando os arquivos de design que você pode usar, filter, background-blend-mode ou mix-blend-mode: multiply; (a melhor escolha na minha opinião). Veja o código abaixo ```

img {
mix-blend-mode: multiply;
opacity: 0.8;}

Aqui a documentação explicando esse efeito mix-blend-mode: https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode

👋 Espero ter ajudado e continue no foco!

Marked as helpful

1

@jvmdo

Posted

@correlucas Obrigado pela dica. Consegui um resultado mais próximo do design com essa propriedade :)

1
Lucas 👾 104,420

@correlucas

Posted

@jvmdo Boa!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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