Tilt Up

Image tilts upward on hover/focus (top recedes), with a small zoom to keep the viewport covered.

Tilt Up demo

Hover or focus the image to see the effect.

HTML

description

CSS

.hover-effect.tilt-up img{
  transition: transform 0.5s ease;
}
.hover-effect.tilt-up:hover img,
.hover-effect.tilt-up:focus-visible img{
  transform: perspective(800px) rotateX(15deg) scale(1.4);
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.tilt-up img{
    transition: none;
  }
  .hover-effect.tilt-up:hover img,
  .hover-effect.tilt-up:focus-visible img{
    transform: perspective(800px) rotateX(15deg) scale(1.4);
  }
}

The animates transform: perspective(800px) rotateX(15deg) scale(1.4), making the top of the image recede. The slight scale prevents blank corners. Select the code and copy with Ctrl+C or ⌘C.