Site News, WWW

on February 28, 2005

It took me a while to find the right code but at last I have got random images in the banner!  It’s easy enough to find scripts that do random images in an HTML page but harder to find ones that can randomise CSS backgrounds.  Refresh this page a few times to see what happens at the top.  Notice how the background changes but the text (which isn’t part of the image) doesn’t? Cool!

Here’s the article at A list apart and the CSS insertion is in the discussion.

  • Facebook
  • Twitter

2 Responses to “random”

  1. Gina says:

    Ohh something geeky. Me like.  rasberry

  2. Tom says:

    Very nice.  I’m totally stealing this – I’ve been wanting to do this for a long time, but had no idea how to do so with CSS.  Now I do . . . now I just have to find some time to make up a bunch of images and put this to work!