帝国CMS教程
帝国CMS模板网>帝国CMS教程

帝国cms模板网为大家提供个右下角广告漂浮代码

来源:帝国CMS模板网 作者:帝国CMS教程 时间:2009-11-25
浏览:9千+ 收藏 点赞(32)

将以下代码添加到需要显示的网页即可!

<div id="ShowAD" style="position:absolute; z-index: 100;"> 
<div id="ImgLayer" style="position:absolute; z-index:1; left: 0px;"> 
<a href="https://www.daixiao360.cn/" target="_blank"> <img src="https://www.daixiao360.cn/skin/cmsmoban/qq/images/weixin.jpg"   border="0"  Width="150"  Height="150"></a>
</div>
</div>
<script type="text/javascript">
var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
var adst = document.getElementById("ShowAD").style;
adst.top = ( bodyfrm.clientHeight - 150) + "px";
adst.left = ( bodyfrm.clientWidth - 150) + "px";
function moveR() {
adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - 150) + "px";
adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - 150) + "px";
}
setInterval("moveR();", 80);
function CloseIVR(){
    adst.display='none';
}
 //-->
 </script>
帝国CMS模板