In general, I know that it is possible to use CSS3 to specify multiple backgrounds, and I have successfully overlaid a gradient on top of an image before. However, this seems to fail when applied to the base html element. In both Chrome and Firefox, the gradient is not rendered in the CSS below:
html {
background:#14283C;
background-image:url('/images/bluenoise.png?1338342472'),-webkit-gradient(radial, center 8em, 0, center 8em, 100, color-stop(0%, rgba(255,255,255,0.2)), color-stop(100%, rgba(255,255,255,0)));
background-image:url('/images/bluenoise.png?1338342472'),-webkit-radial-gradient(center 8em, ellipse closest-corner, rgba(255,255,255,0.2),rgba(255,255,255,0));
background-image:url('/images/bluenoise.png?1338342472'),-moz-radial-gradient(center 8em, ellipse closest-corner, rgba(255,255,255,0.2),rgba(255,255,255,0));
background-image:url('/images/bluenoise.png?1338342472'),-o-radial-gradient(center 8em, ellipse closest-corner, rgba(255,255,255,0.2),rgba(255,255,255,0));
background-image:url('/images/bluenoise.png?1338342472'),-ms-radial-gradient(center 8em, ellipse closest-corner, rgba(255,255,255,0.2),rgba(255,255,255,0));
background-image:url('/images/bluenoise.png?1338342472'),radial-gradient(center 8em, ellipse closest-corner, rgba(255,255,255,0.2),rgba(255,255,255,0));
}
If I apply the same styles to body, the gradient is rendered correctly. Any thoughts on why there would be this difference?
I tried some of the tricks mentioned in the comments, but what ended up working is the following:
The only change is that I list the gradients before the images. It looks like the various
background-imagearguments are overlaid in reverse order. This explanation, though, would seem to be contradicted by ScottS’s fiddle, which also shows the desired behavior despite giving the opposite ordering.