Show DevBest Realistic Image Shadows

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Everyone is familiar with the usual effect of adding a barely visible shadow to images with an almost-transparent background, but I found and decided to try to replicate it in CSS

It uses CSS variables to dynamically size the element and it's shadow and an ::after element to generate its shadow and place it based on the --size variable.
Feel free to play around with the --size variable to see how the shadows respond



Final outcome:
6ZfrnUI.png
 
Last edited:

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Thanks @Wess. The effect isn’t credited to me however, I just put it into practice by mimicking the Instagram post I referenced. :-D
 

Users who are viewing this thread

Top