What is the best method for applying shadow? I am currently working on a site where we have a lot of them, but I struggled to find the best way to do this. The site is quite animated, so the shadows should work well with this.
I tried jQuery shadow pulgin. The shadows looked good and were easy to use, but they were slow and didn’t work very well with the animation (it took a lot of redrawing, very thick).
I also tried to create my own jQuery extension, which wraps my element in a pair of gray divs and then casts them a bit to give a shadow effect. It worked out well. It responds quickly to animations. However, this makes DOM manipulation / traversal cumbersome as everything is wrapped in these shadow divs.
I know that there must be a better way, but this is not exactly my forte. Thoughts?
source
share