Hover or focus the image to see the effect.
HTML
CSS
.hover-effect.wipe-reveal{
position: relative;
display: block;
}
.hover-effect.wipe-reveal::before{
content: "";
position: absolute;
inset: 0;
background: rgba(15, 23, 42, 0.85);
clip-path: inset(0 0 0 0);
transition: clip-path 0.5s ease;
pointer-events: none;
}
.hover-effect.wipe-reveal:hover::before,
.hover-effect.wipe-reveal:focus-visible::before{
clip-path: inset(0 0 0 100%);
}
The ::before wipes off to the left via clip-path: inset(0 0 0 0) -> inset(0 0 0 100%) on hover/focus, revealing the image. Select the code and copy with Ctrl+C or ⌘C.