Hover or focus the image to see the effect.
HTML
<div class="hover-effect zoom-top">
<img src="image.jpg" alt="description">
</div>
CSS
.hover-effect.zoom-top img{
transform-origin: 50% 0%;
transition: transform 0.45s ease;
}
.hover-effect.zoom-top:hover img, .hover-effect.zoom-top:focus-visible img{
transform: scale(1.5);
}
Select the code and copy with Ctrl+C or ⌘C.