Rounded Reveal

A dark overlay covers the image at idle, then grows a large border-radius on hover/focus so its corners retract inward, revealing the four corners of the image.

Rounded Reveal demo

Hover or focus the image to see the effect.

HTML

description

CSS

.hover-effect.rounded-reveal{
  position: relative;
  display: block;
}
.hover-effect.rounded-reveal::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 0;
  transition: border-radius 0.5s ease;
  pointer-events: none;
}
.hover-effect.rounded-reveal:hover::before,
.hover-effect.rounded-reveal:focus-visible::before{
  border-radius: 50%;
}

The ::before grows border-radius: 0 -> 50% on hover/focus, retracting its corners inward and revealing the image corners. Select the code and copy with Ctrl+C or ⌘C.