haitao ·
·
阅读: 557
拉伸的变形,也好过一张背景照片左右、上下重复n次。。。。。。。还是用z方向置底的img来解决
<SCRIPT LANGUAGE=JavaScript>
<!--
function resizeimg()
{
bgimg.width=document.body.clientWidth;
bgimg.height=document.body.clientHeight;
}
window.attachEvent("onresize",resizeimg);
//ff: window.resize=resizeumg;
document.write("<img id=bgimg style='position:absolute;top:0;left:0;z-index:-10;' src='images/xxxx.jpg' width="+document.body.clientWidth+" height="+document.body.clientHeight+">");
//-->
</SCRIPT>