3D Lift

Image lifts forward in 3D space on hover/focus via translateZ, producing a clear "lift" feel.

3D Lift demo

Hover or focus the image to see the effect.

HTML

description

CSS

.hover-effect.lift-3d img{
  transition: transform 0.5s ease;
}
.hover-effect.lift-3d:hover img,
.hover-effect.lift-3d:focus-visible img{
  transform: perspective(800px) translateZ(80px) scale(1.15);
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.lift-3d img{
    transition: none;
  }
  .hover-effect.lift-3d:hover img,
  .hover-effect.lift-3d:focus-visible img{
    transform: perspective(800px) translateZ(80px) scale(1.15);
  }
}

The animates transform: perspective(800px) translateZ(80px) scale(1.15) for a clear 3D lift. Select the code and copy with Ctrl+C or ⌘C.