当前位置:首页 > 代码 > 正文

悬浮底部广告代码(css漂浮广告代码)

admin 发布:2022-12-19 07:49 89


今天给各位分享悬浮底部广告代码的知识,其中也会对css漂浮广告代码进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!

本文目录一览:

求一个右下角的漂浮广告代码?

右下角漂浮广告代码使用方法(一): 将以下代码以**.js文件形式保存,在模板中调用这个js文件即可

(备注该代码的图片大小为250*150 代码里面有参数自己看下就知道了)document.writeln("div id=\"qqaddiv\" style=\"position:absolute; z-index: 100;\" ");

document.writeln("a href=链接地址 target=_blankimg src=图片链接地址 border=0/a");

document.writeln("/div");

var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;

var adst = document.getElementById("qqaddiv").style;

adst.top = ( bodyfrm.clientHeight - 150 ) + "px";

adst.left = ( bodyfrm.clientWidth - 250 ) + "px";

function moveR() {

adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - 150 ) + "px";

adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - 250 ) + "px";

}

setInterval("moveR();", 80); 右下角漂浮广告代码使用方法(二): var qq_etewidth = 259;

var qq_eteheight = 158;

var qq_banner_filename = "广告图片链接地址";

var qq_gotoUrl = '广告链接地址';document.write("div id=eteUnionUpFloat style='margin:0px;padding-bottom:300px;z-index: 10;position:absolute;width:"+qq_etewidth+"px;height:"+qq_eteheight+"px;'")

document.write("a href='"+qq_gotoUrl+"' target='_blank'img src='"+qq_banner_filename+"' border='0' style='cursor: hand;' width='"+qq_etewidth+"' height='"+qq_eteheight+"'/a")

document.write("/div")

var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;

var adst = document.getElementById("eteUnionUpFloat").style;

adst.top = ( bodyfrm.clientHeight - qq_eteheight ) + "px";

adst.left = ( bodyfrm.clientWidth - qq_etewidth ) + "px";

function moveR() {

adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight - qq_eteheight ) + "px";

adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth - qq_etewidth ) + "px";

}

var objTimer=setInterval("moveR();", 100);function CloseX(){

adst.display='none';

}function ete_closediv()

{

document.getElementById('eteUnionUpFloat').style.visibility='hidden';

if(objTimer) window.clearInterval(objTimer)

}

悬浮广告代码,带链接的

这是左侧漂浮的广告代码

SCRIPT FOR=window EVENT=onload LANGUAGE="javascript"

initAd();//载入页面后,调用函数initAd()

/SCRIPT

script language="javascript"

!--

function initAd() {

document.all.AdLayer.style.posTop = -200;

//设置onLoad事件激发以后,广告层相对于固定后的y方向位置

document.all.AdLayer.style.visibility = 'visible'//设置层为可见

MoveLayer('AdLayer');//调用函数MoveLayer()

}

function MoveLayer(layerName) {

var x = 0;//浮动广告层固定于浏览器的x方向位置

var y = 408;//浮动广告层固定于浏览器的y方向位置

var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.90;

var y = document.body.scrollTop + y - diff;

eval("document.all." + layerName + ".style.posTop = y");

eval("document.all." + layerName + ".style.posright = x");//移动广告层

setTimeout("MoveLayer('AdLayer');", 0);//设置20毫秒后再调用函数MoveLayer()

}

//--

/script

div id=AdLayer style='position:absolute; width:61px; height:59px; z-index:20; visibility:hidden;; left: 0px; top: 100px' a href="#"img border="0" src="images/jixiangwu.gif" width="81" height="88"/a/div

js或者CSS带关闭的漂浮广告代码

htmlheadtitle固定在底部的漂浮广告/title/headbodyscript LANGUAGE='JavaScript'var ad_float_left_src="http:/images/logo.gif";var ad_float_left_url = "http:";var ad_float_left_type = "";document.ns = navigator.appName == "Microsoft Internet Explorer"var imgheight_closevar imgleftwindow.screen.width800 ? imgheight_close=120:imgheight_close=120window.screen.width800 ? imgleft=15:imgleft=122function myload(){myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight_close;myleft.style.left=imgleft;leftmove();}function leftmove(){myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight_close;myleft.style.left=imgleft;setTimeout("leftmove();",50)}function MM_reloadPage(init) {if (init==true) with (navigator) {if ((appName=="Netscape")(parseInt(appVersion)==4)) {document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();}MM_reloadPage(true)function close_float_left(){myleft.style.visibility='hidden';}if(document.ns){document.write("div id=myleft style='position: absolute;width:80;top:300;left:5;visibility: visible;z-index: 1'styleA.closefloat:link,A.refloat:visited {text-decoration:none;color:#000000;font-size:12px}A.closefloat:active,A.refloat:hover {text-decoration:underline;color:#0000FF;font-size:12px}/styletable border=0 cellpadding=0 cellspacing=0trtd");if(ad_float_left_type!="swf")document.write("a href='" + ad_float_left_url + "' target = '_blank'img src='" + ad_float_left_src + "' WIDTH=100 HEIGHT=100 border = 0/a");elsedocument.write("EMBED src='" + ad_float_left_src + "' FlashVars='" + ad_float_left_url + "' quality=high WIDTH=80 HEIGHT=80 TYPE='application/x-shockwave-flash' id=changhongout /EMBED");document.write("/td/trtrtd width=80 height=20 align=righta href='javascript:close_float_left();void(0);' class=closefloatfont color=#0000ff size=2关闭font/a/td/tr/table/div");myload()}/script/body/html

关于悬浮底部广告代码和css漂浮广告代码的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/4784.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载