Pan Top Left

Image slides diagonally toward the top-left corner, revealing more of the bottom-right.

Pan Top Left demo

Hover or focus the image to see the effect.

HTML

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

CSS

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

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