Pan Bottom

Image slides down, revealing more of the top of the picture.

Pan Bottom demo

Hover or focus the image to see the effect.

HTML

<div class="hover-effect pan-bottom">
  <img src="image.jpg" alt="description">
</div>

CSS

.hover-effect.pan-bottom{
  overflow: hidden;
}
.hover-effect.pan-bottom img{
  transform: scale(1.2);
  transition: transform 0.5s ease;
}
.hover-effect.pan-bottom:hover img,
.hover-effect.pan-bottom:focus-visible img{
  transform: scale(1.2) translateY(25px);
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.pan-bottom img{
    transition: none;
  }
  .hover-effect.pan-bottom:hover img,
  .hover-effect.pan-bottom:focus-visible img{
    transform: scale(1.2);
  }
}

Select the code and copy with Ctrl+C or ⌘C.