I want to put the background after you downlo开发者_开发百科ad the entire code and files in html. It can however be done. Make it so that the background is loaded after all the content.
Set it after the DOM loads:
$(function() {
$("body").css("background-color", "red");
});
or after the whole page (e.g. images) has loaded:
$(window).load(function() {
$("body").css("background-color", "red");
});
If by background you mean a background image:
$(function(){
$('body').css('background','url(\'url-to-background-image\')');
});
精彩评论