View Single Post
Old 12-09-2012, 10:41 PM   PM User | #1
ARCLite Studio
New Coder

 
Join Date: Sep 2009
Posts: 73
Thanks: 5
Thanked 9 Times in 9 Posts
ARCLite Studio is an unknown quantity at this point
CSS Prevent background reload

Using the CSS3 code below to present a full screen background image, I have noticed that as I switch pages in the website, the Background is reloading. Basically the background goes white and then progressive loads the image. The code is in a external stylesheet linked to by all pages.

Anybody know how this can be coded differently where the reload is not occurring?

I assume it is because the "cover" attribute is recalculating the window/screen size each time, but I also thought that caching would prevent that. Anyways, any feedback would be great.

Code:
body {

 background:url('../images/bg.jpg') no-repeat center center fixed;

-webkit-background-size: cover;

 -moz-background-size: cover;

 -o-background-size: cover;

 background-size: cover;

 }
ARCLite Studio is offline   Reply With Quote