Temporary background image while the big one is loading? [migrated]

Posted by Mikhail on Pro Webmasters See other posts from Pro Webmasters or by Mikhail
Published on 2012-03-22T17:45:29Z Indexed on 2012/03/22 23:39 UTC
Read the original article Hit count: 159

Filed under:
|

Is there a way, without javascript, to load a small image for a background before the real image is downloaded? Without javascript because I know how to do it with it.

I can't test if the following CSS3 would work because it works too quick:

body { 
  background-image:url('hugefile.jpg'), url('tinypreload.jpg');
}

If the tinypreload.jpg is only, say 20k, and the hugefile.jpg is 300k -- would this accomplish the task? I assume that both downloads would start at the same time instead of being consecutive.

© Pro Webmasters or respective owner

Related posts about css

Related posts about mobile