Slide Reveal Bottom

Cover anchored to the top edge shrinks on hover, revealing the image from bottom to top.

Slide Reveal Bottom demo

Hover or focus the image to see the effect.

HTML

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

CSS

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

The cover pseudo is anchored to the top edge and its height shrinks to zero on hover. Select the code and copy with Ctrl+C or ⌘C.