Last active
June 23, 2022 14:26
-
-
Save jeffersondev/d8b836eeab4d072286b9fdab4267eb18 to your computer and use it in GitHub Desktop.
Curso de FrontEnd da TOTI - Módulo de CSS3 - Aula de Cards (replicação do elemento de Card do Mercado Livre - https://www.mercadolivre.com.br)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| font-family: sans-serif; | |
| } | |
| body { | |
| background-color: rgb(231 231 231); | |
| } | |
| a { | |
| text-decoration: none; | |
| color: inherit; | |
| } | |
| img { | |
| max-height: 100%; | |
| max-width: 100%; | |
| } | |
| .card { | |
| height: 425px; | |
| width: 225px; | |
| border-radius: 4px; | |
| background-color: rgb(255 255 255); | |
| box-shadow: 0 1px 2px 0 rgba(0 0 0 / 12%); | |
| overflow: hidden; | |
| } | |
| .card:hover { | |
| box-shadow: 0 0 1px 1px rgba(0 0 0 / 7%), 0 10px 15px 0 rgba(0 0 0 / 10%); | |
| } | |
| .card__imagem { | |
| border-bottom: 1px solid rgb(245 245 245); | |
| } | |
| .card__info { | |
| padding: 16px; | |
| } | |
| .card__info > span { | |
| display: block; | |
| margin-top: 4px; | |
| } | |
| .card__badge { | |
| background-color: rgb(53, 131, 250); | |
| border-radius: 3px; | |
| color: rgb(255 255 255); | |
| text-transform: uppercase; | |
| font-size: 12px; | |
| line-height: 14px; | |
| width: fit-content; | |
| padding: 2px 4px; | |
| margin-bottom: 4px; | |
| } | |
| .card__precoanterior { | |
| font-size: 12px; | |
| font-weight: 300; | |
| color: rgb(102 102 102); | |
| text-decoration: line-through; | |
| } | |
| .card__precoatual { | |
| font-size: 24px; | |
| line-height: 24px; | |
| color: rgba(0 0 0 / 80%); | |
| } | |
| .card__desconto { | |
| font-size: 12px; | |
| line-height: 18px; | |
| color: rgb(0 166 80); | |
| } | |
| .card__parcelamento, | |
| .card__frete { | |
| font-size: 14px; | |
| font-weight: 300; | |
| color: rgb(0 166 80); | |
| } | |
| .card__titulo { | |
| font-size: 14px; | |
| font-weight: 300; | |
| color: rgb(0 0 0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body> | |
| <div class="card"> | |
| <a href="#"> | |
| <img src="https://http2.mlstatic.com/D_Q_NP_2X_774385-MLA44134619733_112020-P.webp" alt="Foto do LG K22" class="card__imagem"> | |
| <div class="card__info"> | |
| <span class="card__badge">Oferta do dia</span> | |
| <span class="card__precoanterior">R$ 729</span> | |
| <span> | |
| <span class="card__precoatual">R$ 699</span> | |
| <span class="card__desconto">4% OFF</span> | |
| </span> | |
| <span class="card__parcelamento">12X R$ 58,25 sem juros</span> | |
| <span class="card__frete">Frete grátis</span> | |
| <span class="card__titulo">LG K22 Dual Sim 32 Gb Titan 2 Gb Ram</span> | |
| </div> | |
| </a> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment