Hover or focus the image to see the effect.
HTML
CSS
.hover-effect.directional-shadow img{
transition: box-shadow 0.4s ease;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
}
.hover-effect.directional-shadow:hover img,
.hover-effect.directional-shadow:focus-visible img{
box-shadow:
16px 16px 28px rgba(0, 0, 0, 0.35),
24px 24px 40px rgba(0, 0, 0, 0.15);
}
The animates its box-shadow from a small centered shadow to a two-layer bottom-right offset shadow on hover/focus, creating a directional long-shadow. Select the code and copy with Ctrl+C or ⌘C.