mirror of
https://github.com/maciejpedzich/cats-album.git
synced 2024-11-27 14:25:47 +01:00
Insert padding between card image and body
This commit is contained in:
parent
d5b245b33a
commit
1f5a65d977
@ -16,6 +16,7 @@ const { cat } = Astro.props;
|
||||
alt={cat.data.image.alt}
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="350"
|
||||
height="250"
|
||||
/>
|
||||
</div>
|
||||
@ -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);
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user