Changer l'arrière-plan d'un élément dans une boucle en utilisant CSS

    var colors = ['blue', 'green', 'yellow', 'black'],
        colorIndex = 0,
        $body = $('body');
    
    setInterval(function(){ $body.css('background', colors[colorIndex++ % colors.length])}, 1000);
Yucky Yak