Slide Reveal Top Right

Cover anchored to the bottom-left corner shrinks on hover, revealing the image from the top-right.

Slide Reveal Top Right demo

Hover or focus the image to see the effect.

HTML

<div class="hover-effect slide-reveal-top-right">
  <img src="image.jpg" alt="description">
</div>

CSS

.hover-effect.slide-reveal-top-right{
  position: relative;
}
.hover-effect.slide-reveal-top-right::before{
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  transition: width, height 0.5s ease;
}
.hover-effect.slide-reveal-top-right:hover::before,
.hover-effect.slide-reveal-top-right:focus-visible::before{
  width: 0;
  height: 0;
}
@media (prefers-reduced-motion: reduce) {
  .hover-effect.slide-reveal-top-right::before{
    transition: none;
  }
  .hover-effect.slide-reveal-top-right:hover::before,
  .hover-effect.slide-reveal-top-right:focus-visible::before{
    width: 0;
    height: 0;
  }
}

The cover pseudo is anchored to the bottom-left corner and both width and height shrink to zero on hover. Select the code and copy with Ctrl+C or ⌘C.