关于对联问题
为什么我把对联加到首页 就把首页搞的变形了...我首页是用div写的..搞了一天了大哥大姐帮帮我吧
对联代码是这样的:
suspendcode="<DIV id=lovexin1 style='Z-INDEX: 10; LEFT: 32px; POSITION: absolute; TOP: 105px;'><img src='gg/a000.gif' width='106' height='318' border='0' alt='对联广告位95x300招租'></a></DIV>"
document.write(suspendcode);
suspendcode="<DIV id=lovexin2 style='Z-INDEX: 10; LEFT: 912px; POSITION: absolute; TOP: 105px;'><img src='gg/b000.gif' width='106' height='318' border='0' alt='对联广告位95x300招租'></a></DIV>"
document.write(suspendcode);
lastScrollY=0;
function heartBeat(){
diffY=document.body.scrollTop;
percent=.3*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.lovexin1.style.pixelTop+=percent;
document.all.lovexin2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
function hide()
{
lovexin1.style.visibility="hidden";
lovexin2.style.visibility="hidden";
}
window.setInterval("heartBeat()",1);