2011-01-10 1 views

Répondre

2

Set après les charges DOM:

$(function() { 
    $("body").css("background-color", "red"); 
}); 

ou après la page entière (par exemple des images) a chargé:

$(window).load(function() { 
    $("body").css("background-color", "red"); 
}); 
1

Si par un fond que vous voulez dire une image de fond:

$(function(){ 
    $('body').css('background','url(\'url-to-background-image\')'); 
});