Hover or focus the image to see the effect.
HTML
CSS
.hover-effect.shadow-reveal img{
transition: box-shadow 0.4s ease;
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
.hover-effect.shadow-reveal:hover img,
.hover-effect.shadow-reveal:focus-visible img{
box-shadow:
0 12px 28px rgba(0, 0, 0, 0.25),
0 4px 10px rgba(0, 0, 0, 0.15);
}
The animates from a transparent shadow to a two-layer drop shadow on hover/focus, creating subtle depth. Select the code and copy with Ctrl+C or ⌘C.