Shadow Wolf Posted July 19, 2007 Share Posted July 19, 2007 Is it possible with just CSS to randomize or have the background cycle through a set of pre-selected background images? Quote Link to comment Share on other sites More sharing options...
jvrothjr Posted July 19, 2007 Share Posted July 19, 2007 You want to do it on load or as ther user is sitting at the page? Quote Link to comment Share on other sites More sharing options...
calabiyau Posted July 19, 2007 Share Posted July 19, 2007 No you can't do that with just css...on load you could use php to pick a random background...while user is sitting there to cycle through, I would think javascript could do that. Quote Link to comment Share on other sites More sharing options...
Shadow Wolf Posted September 14, 2007 Author Share Posted September 14, 2007 It would be with onload, not as the user is sitting there. Just when they load or refresh the page the background would random. Sort of like randomizing a banner/header but wanting that to remain static while the background changes so the banner/header is always the top layer. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 14, 2007 Share Posted September 14, 2007 can't do it in css - use php to set an inline style attribute like so <.... style="background-image: url(/path/to/background/image)" ....> set the rest of the background styles in your css file. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.