Quick Zoom

Snappy 2x zoom from the top-left corner.

Quick Zoom demo

Hover or focus the image to see the effect.

HTML

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

CSS

.hover-effect.quick-zoom img{
  transform-origin: 0 0;
  transition: transform 0.3s ease-in;
}

.hover-effect.quick-zoom:hover img, .hover-effect.quick-zoom:focus-visible img{
  transform: scale(2);
}

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