CSS Drop Shadows
A while back I posted some code for making css drop shadows. I didn’t do a very good job of publicizing it though, so I doubt anyone noticed it. Its a cgi script and it works best with a little javascript mixed in.
Yes, this is a *very* simple tool. It has a few obvious opportunities for enhancement, such as caching and choosing the canvas color. If anyone makes improvements, I’d enjoy updating my code to include them.
Anyway, here’s about the simplest way to use it:
<img src=”…” width=”100″ height=”100″ style=”background-image: url(/cgi-bin/ds.cgi?width=100&height=100);”>
The README.txt includes documentation and examples of ways to use js/css to add drop shadows to select images on your website quite easily.
Check the code, its quite simple.




It would be useful to provide some examples right here in this post to see the end result.
If I put an example up, then I’m subject to abuse by people who want to use it, but don’t want to host it. I think I will, but I need to get a good referrer check in place.
Don’t forget to encode “&” using entities :
<img src="..." width="100" height="100" style="background-image: url(/cgi-bin/ds.cgi?width=100&height=100);">