DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Random Background image (http://www.daniweb.com/forums/thread53330.html)

SLM-Manu Aug 25th, 2006 5:36 am
Random Background image
 
1) Is it possible to preload image using css? If yes, how?
Here is the format of my css....

body {
background-image: url(g9brk05.gif);
margin-left: 5px;
margin-top: 5px;
margin-right: 5px;
margin-bottom: 2px;
}


2) Is it possible to use random background image using css?........... How?

Lafinboy Aug 25th, 2006 7:31 am
Re: Random Background image
 
You can't preload with CSS, but the images will be cached after first load.

Depending on your server there are various ways to generate random backgrounds. I have a sample CSS Random Background Image rotation script on my blog which may help you.


All times are GMT -4. The time now is 6:32 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC