png-shadow CSS snippet

.png-shadow {overflow: visible; -webkit-filter: drop-shadow(5px 5px 5px #727272); filter: drop-shadow(5px 5px 5px #727272);}   

After a lot of research looking for the neatest CSS solution to a one-off client request for shadows on a png image, I discovered this solution.

I've slimmed down the original CSS to fit my use case and appears to work on all up to date browsers.

(Of course, I could have simply created the png plus the shadow with transparent bg - but where's the fun in that?)

3
3 replies