700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > js浮动广告框(可根据屏幕大小自动调整位置)

js浮动广告框(可根据屏幕大小自动调整位置)

时间:2022-07-11 08:56:26

相关推荐

js浮动广告框(可根据屏幕大小自动调整位置)

js浮动广告框(可根据屏幕大小自动调整位置)

左下角

右下角

<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=GBK"/></head><body><styletype="text/css">#rbbox{border:1pxsolid#f00;width:180px;height:0px;margin:0px;padding:0px;overflow:hidden;position:absolute;left:0;bottom:0;}.vipall{border:0pxsolid#00f;background:url(images/booking.jpg)no-repeat;width:180px;height:150px;margin:0px;padding:0px;position:relative;}.vipclose{border:0pxsolid#f00;font-size:12px;}.vipclosea{text-decoration:none;color:#444;}.vipclosea:hover{text-decoration:none;}</style><divid="rbbox"><divclass="vipclose"><ahref="#"onclick="closeBox()">关闭</a></div><ahref="/booking/"style="cursor:pointer"><divclass="vipall"></div></a></div><scriptlanguage="javascript"type="text/javascript">window.onload=function(){showBox();setTimeout("closeBox()",300000)}functionshowBox(o){if(o==undefined)o=document.getElementById("rbbox");oo.style.height=o.clientHeight+2+"px";if(o.clientHeight<180)setTimeout(function(){showBox(o)},5);}functioncloseBox(){document.getElementById("rbbox").style.display="none";}</script></body></html>

本文转自许琴 51CTO博客,原文链接:/xuqin/928665,如需转载请自行联系原作者

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。