Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
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
Old 12-10-2012, 09:26 AM   PM User | #2
Custard7A
Regular Coder

 
Custard7A's Avatar
 
Join Date: Jul 2010
Location: Australia
Posts: 269
Thanks: 32
Thanked 32 Times in 32 Posts
Custard7A is an unknown quantity at this point
I'm not familiar with using cover, but I would have thought caching would keep the image in memory regardless. It's probably something silly, like your browser cache is full, or not actually on (I don't mean to be insulting ). Perhaps try it in several browsers, and see if still insists on reloading each time?
Custard7A is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:39 AM.


Advertisement
Log in to turn off these ads.