网页背景自适应大小jQuery插件 fullBG.js
HTML
<img id="background" src="images/bg.jpg" style="visibility: hidden" id="background"/>
CSS
/* =Default needed for fullBG jQuery plugin
-------------------------------------------------------------- */
.fullBg {
position:fixed;
top:0;
left:0;
overflow: hidden;
z-index:-1;
}
Javascript
$(window).load(function(){
$('#background').fullBG();
});