Vertical Skew

Image skews vertically on hover/focus, with a small zoom to keep the viewport covered.

Vertical Skew demo

Hover or focus the image to see the effect.

HTML

description

CSS

.hover-effect.skew-vertical img{
  transition: transform 0.5s ease;
}
.hover-effect.skew-vertical:hover img,
.hover-effect.skew-vertical:focus-visible img{
  transform: scale(1.4) skewY(15deg);
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.skew-vertical img{
    transition: none;
  }
  .hover-effect.skew-vertical:hover img,
  .hover-effect.skew-vertical:focus-visible img{
    transform: scale(1.4) skewY(15deg);
  }
}

The animates transform: scale(1.4) skewY(15deg). The slight scale prevents blank corners as the image skews. Select the code and copy with Ctrl+C or ⌘C.