Support » Themes and Templates » Background colour rotation

  • Hello,

    I’d like to try switching the background colour of my blog on each visit automatically. I assume this is done with some simple CSS and PHP? Can anyone point in the right place?

    Thanks in advance

    ssor

Viewing 1 replies (of 1 total)
  • I have found the following script, as used by Tweetcc, but unsure where to call it:

    <?php
    // choose a random background colour
    // list of HEX colours to choose from
    $colors = array(‘253e76′,’340d0e’,’5d2901′);

    // randomly select a colour from the list
    $bgColour = $colors[rand(0,count($colors)-1)];
    echo ‘html { background: #’.$bgColour.’;}’;
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Background colour rotation’ is closed to new replies.