diff --git a/src/components/CatCard.astro b/src/components/CatCard.astro index 6d6a90d..b9ef6d5 100644 --- a/src/components/CatCard.astro +++ b/src/components/CatCard.astro @@ -16,6 +16,7 @@ const { cat } = Astro.props; alt={cat.data.image.alt} loading="lazy" decoding="async" + width="350" height="250" /> @@ -41,10 +42,12 @@ const { cat } = Astro.props; margin: 0.5rem 0; padding: 0; flex-direction: column; + transition-property: transform; + transition-duration: 300ms; } .card h3 { - margin-top: 0.75rem; + margin-top: 0; margin-bottom: 0; } @@ -54,6 +57,8 @@ const { cat } = Astro.props; .img-wrapper { width: 100%; + padding: 2rem; + padding-bottom: 0.75rem; position: relative; overflow: hidden; } @@ -63,11 +68,9 @@ const { cat } = Astro.props; width: 100%; max-height: 250px; object-fit: cover; - transition-property: transform; - transition-duration: 300ms; } - .card:hover img { - transform: scale(1.1); + .card:hover { + transform: scale(1.05); }