Here’s an old idea, but recreated with pure CSS.
Originally, I had an extra wrapper and two extra pseudo-elements on it. Later I decided to rewrite the code and to use just a single element (by using radial gradients).
While this method is simple, there are some limitations:
- the background must be
- there are some positioning issues
But in most regards this method is rather bulletproof.
If you replace the CSS-gradients with simple images, this method could work in IE. (It might need a few more small fixes; I didn’t check.)