Slide Cover Bottom

Cover anchored to the bottom edge grows from zero to full height on hover, covering the image from bottom to top.

Slide Cover Bottom demo

Hover or focus the image to see the effect.

HTML

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

CSS

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

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