Random CSS Background Image
I'm flirting with some dangerous downtime right now so I figure I'll write out a blog, maybe with something useful. Here goes nothing...
Link: http://www.javascriptkit.com/script/cut176.shtml
That's the link I came across while searching for a random background image generator. It takes a little tweaking, but works really well with your style sheet and is pretty light-weight. If you're concerned at all about users browsing with JavaScript turned off you can also define a background image in the CSS file so that will load first and then the random JS image will load (you can see it happen if you rapidly refresh the page a few times, otherwise it's fairly smooth).
I've used this a few times with very little trouble, seems to work fine cross-browser, but again, if it doesn't for some reason, you'll always have the original bg image in the CSS to mask it.
Featured writing
- What You Need to Know About Behavioral CSS
- CSS Techniques I Wish I Knew When I Started Designing Websites
- HTML5 and the Future of the Web
- 10 Tips to Create a More Usable Web
- 20 Sites That Brought CSS into the Mainstream
- CSS Angles: Just the Edge Your Web Page Needs!
- Elastic Calendar Styling with CSS
- Tomorrow's CSS Today: 8 Techniques They Don't Want You To Know
