用本贴持续记录一些收集的广告效果。希望给有需求的朋友们一些支持。也希望朋友们把我未记录的广告形式也给予一起回贴。使本贴更加的完善,也让更多的朋友们分享。
1.翻屏效果
翻屏效果
复制代码 代码如下:
<html>
<head></head>
<body>
<div style="HEIGHT:85px">
<script LANGUAGE='JavaScript'>
document.ns = navigator.appName == "Microsoft Internet Explorer";
function showStr(str,textWidth,num)
{
if(!document.ns)
{
document.write(str[0]+'<br>')
}
else
{
var wrt="";
wrt+='<table border=0 cellspacing=0 cellpadding=0>';
wrt+='<tr><td>';
wrt+='<div id="icefable1'+num+'">';
wrt+='<table width='+textWidth+' border=0 cellspacing=0 cellpadding=0>';
for (var i in str)
{
wrt+='<tr><td height=20>'+str[i]+'</td></tr>';
} scroll_num=i;
wrt+='</table>';
wrt+='</div>';
wrt+='<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden"></div>';
wrt+='</td></tr>';
wrt+='</table>';
document.write(wrt);
}
}
function init_srolltext(num){countnum=0;eval('stopscroll'+num+'=false;');
eval('icefable1'+num+'.scrollTop=0;');
rotatenum=0;
eval('icefable1'+num+'.style.width=0;');
eval('icefable1'+num+'.style.height=marqueesHeight;');
eval('icefable1'+num+'.style.overflowX="visible";');
eval('icefable1'+num+'.style.overflowY="hidden";');
eval('icefable1'+num+'.noWrap=true;');
eval('icefable1'+num+'.onmouseover=new Function("stopscroll=true");');
eval('icefable1'+num+'.onmouseout=new Function("stopscroll=false");');
eval('preTop'+num+'=0; ');
eval('currentTop'+num+'=0;');eval('stoptime'+num+'=0;');
eval('icefable2'+num+'.innerHTML="";');
eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;');
eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;');
eval('setInterval("scrollUp'+num+'()",40);');
}
function scrollUp1()
{
if(stopscroll1==true) return;
currentTop1+=1;
if(currentTop1==marqueesHeight+1)
{
stoptime1+=1;
currentTop1-=1;
if(stoptime1==scrolllen*marqueesHeight)
{
currentTop1=0;
stoptime1=0;
}
}
else
{
preTop1=icefable11.scrollTop;
icefable11.scrollTop+=1;
if(icefable11.scrollTop==scrolllen*marqueesHeight+1)
{
preTop1=0;
currentTop1=0;
stoptime1=0;
icefable11.scrollTop=0;
}}}
var strArray1=new Array();strArray1[0]='<a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=电脑时尚应用系列 target=_blank><img border=0 src=/image/shishang.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=实例精讲 target=_blank><img border=0 src=/image/button20.gif height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=企业级开发案例精解 target=_blank><img border=0 src=/image/button21.gif height=80 width=150></a> <a href=http://www.dearbook.com.cn/subject/top50/ target=_blank><img border=0 src=/image/button15.gif height=80 width=150></a> ';strArray1[1]='<a href=http://www.dearbook.com.cn/2005/c++/ target=_blank><img border=0 src=/image/primer.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/subject/VBzh/ target=_blank><img border=0 src=/image/vb-bt.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=开发答疑&searchtype=0&corder=3&page=1&log=0 target=_blank><img border=0 src=/image/hospital.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=国外计算机科学教材系列 target=_blank><img border=0 src=/image/WH.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/SUBJECT/c++/index.htm target=_blank><img border=0 src=/image/c++.jpg height=80 width=150></a> ';var scrolllen=strArray1.length;marqueesHeight=82;showStr(strArray1,580,1);init_srolltext(1);</script>
</div>
</body>
</html>
2.广告轮显
轮流显示
复制代码 代码如下:
<html>
<head>
<SCRIPT>
var elady_tp=new Array();
var elady_tplink1=new Array();
var elady_tptext=new Array();
var adNumvii=0;
elady_tp[0]="http://pic1.e26.cn/mb/5108/yft/images/1.gif"
elady_tp[1]="http://pic1.e26.cn/mb/5108/yft/images/3.gif"
elady_tp[2]="http://pic1.e26.cn/mb/5108/yft/images/2.gif"
var elady_cimage=new Array();
for (i=1;i<=5;i++){elady_cimage[i]=new Image();
elady_cimage[i].src=elady_tp[i];
}
function set_coelady1(){ if (document.all)
{ elady_tprotator1.filters.revealTrans.Transition=Math.floor(Math.random()*23);
elady_tprotator1.filters.revealTrans.apply(); }
}
function play_coelady1()
{ if (document.all) elady_tprotator1.filters.revealTrans.play()
}function next_elady1(){ if(adNumvii<elady_tp.length-1)adNumvii++ ;
else adNumvii=0;
set_coelady1();
document.images.elady_tprotator1.src=elady_tp[adNumvii];
play_coelady1();
theTimer=setTimeout("next_elady1()", 4000);}
function linkurl1(){ jumpUrl1=elady_tplink1[adNumvii];
jumpTarget1='_blank';
if (jumpUrl1 != ''){ if (jumpTarget1 != '')window.open(jumpUrl1,jumpTarget1);
else location.href=jumpUrl1;
}}
function listMsg1()
{ status=elady_tplink1[adNumvii];
document.returnValue = true;
}
</SCRIPT>
</head>
<body>
<img style="FILTER: revealTrans(duration=2,transition=20)" src="/UploadFiles/2021-04-02/javascript:next_elady1()"></body>
</html>
3.流动广告
流动广告
复制代码 代码如下:
<html>
<head></head>
<body>
<marquee onMouseOver=this.stop() onMouseOut=this.start() scrollamount=5 behavior=alternate>
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td><img src="/UploadFiles/2021-04-02/1301.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1306.gif"><td><img src="/UploadFiles/2021-04-02/1311.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1203.gif"><td><img src="/UploadFiles/2021-04-02/1208.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1219.gif"><td><img src="/UploadFiles/2021-04-02/1224.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1234.gif"><td><img src="/UploadFiles/2021-04-02/1258.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1280.gif"><td><img src="/UploadFiles/2021-04-02/1356.gif"></tr>
</tbody>
</table>
</marquee>
</body>
</html>
4.移动广告框
移动广告
复制代码 代码如下:
<div id="img" style="LEFT:27px; visibility=hidden;POSITION:absolute; TOP:1115px">
<a href="www.eyou.com" target="_blank">
<img border=0 src="/UploadFiles/2021-04-02/gg.png"></a>
</div>
<script language="javascript">
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.style.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
// End -->
</script>
5.左右底部广告
复制代码 代码如下:
<script type="text/javascript" language="javascript">
var MmyeeAdShow = 3; //1为左侧显示 2为右侧显示 其他为两侧显示
var MmyeeAdWidth =300; //广告宽度
var MmyeeAdHeight = 200; //广告高度
//左边浮动
var AdLeftContent= "<div><iframe id='iframyee' bordercolor='#000000' frameborder='0' hspace='0' marginheight='0' marginwidth='0' scrolling='no' src='http://a311300.cnblogs.com' width='"+MmyeeAdWidth+"' height='"+MmyeeAdHeight+"'></iframe></div>";
//右边浮动
var AdRightContent = "<div><iframe id=iframyee frameborder=0 marginwidth=0 marginheight=0 bordercolor='#000000' hspace='0' scrolling=no src='http://a311300.cnblogs.com' width='"+MmyeeAdWidth+"' height='"+MmyeeAdHeight+"'></iframe></div>"
//漂浮据页面底部设定框值,为了美观请不要修改次参数
var marginTop = 10
//漂浮据边框的距离
var marginLeft = 5
var navUserAgent = navigator.userAgent
function load()
{
judge();
move();
}
function move() {
judge();
setTimeout("move();",80)
}
function judge(){
if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) {
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
}
if (MmyeeAdShow != "1") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth) - MmyeeAdWidth - marginLeft + 'px';
}
}
else{
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
}
if (MmyeeAdShow != "1") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth) - MmyeeAdWidth - marginLeft + 'px';
}
}
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.left = marginLeft + 'px';
}
}
if (MmyeeAdShow != "2") {
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + MmyeeAdWidth + ";\"><table border=0 cellpadding=0 cellspacing=0><tr><td>"+AdLeftContent+"</td></tr></table></div>");
}
if (MmyeeAdShow != "1") {
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + MmyeeAdWidth + ";\"><table border=0 cellpadding=0 cellspacing=0><tr><td>"+AdRightContent+"</td></tr></table></div>");
}
load();
</script>
6.左侧浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Left();//载入页面后,调用函数init_Ad_Left().
</script>
<script language="javascript">
<!--
function init_Ad_Left() {
document.all.AdLeftLayer.style.posTop = -200;
//设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdLeftLayer.style.visibility = 'visible'//设置层为可见
MoveLeftLayer('AdLeftLayer');//调用函数MoveLayer()
}
function MoveLeftLayer(layerName)
{
var x = 20;//浮动广告层固定于浏览器的x方向位置
var y = 200;//浮动广告层固定于浏览器的y方向位置
var diff = (document.documentElement.scrollTop + y - document.all.AdLeftLayer.style.posTop)*.90;
var y = document.documentElement.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveLeftLayer('AdLeftLayer');", 0);//设置20毫秒后再调用函数MoveLayer()
}
//-->
</script>
<div id="AdLeftLayer" style='position: absolute; width: 100px; height: 200px; z-index: 20;visibility: visible; left: 20px; top: 100px'>
加入你要放置的内容
<!--嵌入子页-->
<iframe id="iframyee11" allowtransparency='true' bordercolor='#000000' frameborder="0" height='20' hspace='0' marginheight="0" marginwidth="0" scrolling="no" src='Detail.aspx' width='120'></iframe>
dsfsfqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq
qqqqq qqqqqqqq qqqqqqqq qqqqqqq
</div>
7.右侧浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Right();//载入页面后,调用函数init_Ad_Right()
</script>
<script language="javascript">
<!--
function init_Ad_Right()
{
document.all.AdRightLayer.style.posTop = -300; //设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdRightLayer.style.visibility = 'visible'; //设置层为可见
MoveRightLayer('AdRightLayer'); //调用函数MoveRightLayer()
}
function MoveRightLayer(layerName)
{
var x = 20; //浮动广告层固定于浏览器的x方向位置
var y = 200;//浮动广告层固定于浏览器的y方向位置
var diff = (document.documentElement.scrollTop + y - document.all.AdRightLayer.style.posTop)*.90;
var y = document.documentElement.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveRightLayer('AdRightLayer');", 0);//设置20毫秒后再调用函数MoveRightLayer()
}
//-->
</script>
<div id="AdRightLayer" style='position: absolute; width: 100px; height: 200px; z-index: 20;visibility: hidden; right: 30px; top: 600px'>
加入你要放置的内容
<!--嵌入子页-->
<iframe id="iframyee2" allowtransparency='true' bordercolor='#000000' frameborder="0" height='20' hspace='0' marginheight="0" marginwidth="0" scrolling="no" src='Detail.aspx' width='120'></iframe>
hhhhhh hhhhhh hh hhhhhh hhhhhh hhhhhh h hhhhhh hhhhhh hhhhhh hhhhhh hh
</div>
8.左右浮动广告
以下各层不变,在event="onload"中同时加载init_Ad_Left()和 init_Ad_Right()方法
左右浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Left();//载入页面后,调用函数init_Ad_Left()
init_Ad_Right();//载入页面后,调用函数init_Ad_Right()
</script>
9.falsh广告轮显
Flash广告轮显Demo
感谢好友位绰提供此广告展现样式
有兴趣的朋友还可以封装成ASP.NET里的自定义控件。这样使用更为方便。
1.翻屏效果
翻屏效果
复制代码 代码如下:
<html>
<head></head>
<body>
<div style="HEIGHT:85px">
<script LANGUAGE='JavaScript'>
document.ns = navigator.appName == "Microsoft Internet Explorer";
function showStr(str,textWidth,num)
{
if(!document.ns)
{
document.write(str[0]+'<br>')
}
else
{
var wrt="";
wrt+='<table border=0 cellspacing=0 cellpadding=0>';
wrt+='<tr><td>';
wrt+='<div id="icefable1'+num+'">';
wrt+='<table width='+textWidth+' border=0 cellspacing=0 cellpadding=0>';
for (var i in str)
{
wrt+='<tr><td height=20>'+str[i]+'</td></tr>';
} scroll_num=i;
wrt+='</table>';
wrt+='</div>';
wrt+='<div id="icefable2'+num+'" style="position:absolute;z-index:1;visibility:hidden"></div>';
wrt+='</td></tr>';
wrt+='</table>';
document.write(wrt);
}
}
function init_srolltext(num){countnum=0;eval('stopscroll'+num+'=false;');
eval('icefable1'+num+'.scrollTop=0;');
rotatenum=0;
eval('icefable1'+num+'.style.width=0;');
eval('icefable1'+num+'.style.height=marqueesHeight;');
eval('icefable1'+num+'.style.overflowX="visible";');
eval('icefable1'+num+'.style.overflowY="hidden";');
eval('icefable1'+num+'.noWrap=true;');
eval('icefable1'+num+'.onmouseover=new Function("stopscroll=true");');
eval('icefable1'+num+'.onmouseout=new Function("stopscroll=false");');
eval('preTop'+num+'=0; ');
eval('currentTop'+num+'=0;');eval('stoptime'+num+'=0;');
eval('icefable2'+num+'.innerHTML="";');
eval('icefable2'+num+'.innerHTML+=icefable1'+num+'.innerHTML;');
eval('icefable1'+num+'.innerHTML=icefable2'+num+'.innerHTML+icefable2'+num+'.innerHTML;');
eval('setInterval("scrollUp'+num+'()",40);');
}
function scrollUp1()
{
if(stopscroll1==true) return;
currentTop1+=1;
if(currentTop1==marqueesHeight+1)
{
stoptime1+=1;
currentTop1-=1;
if(stoptime1==scrolllen*marqueesHeight)
{
currentTop1=0;
stoptime1=0;
}
}
else
{
preTop1=icefable11.scrollTop;
icefable11.scrollTop+=1;
if(icefable11.scrollTop==scrolllen*marqueesHeight+1)
{
preTop1=0;
currentTop1=0;
stoptime1=0;
icefable11.scrollTop=0;
}}}
var strArray1=new Array();strArray1[0]='<a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=电脑时尚应用系列 target=_blank><img border=0 src=/image/shishang.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=实例精讲 target=_blank><img border=0 src=/image/button20.gif height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=企业级开发案例精解 target=_blank><img border=0 src=/image/button21.gif height=80 width=150></a> <a href=http://www.dearbook.com.cn/subject/top50/ target=_blank><img border=0 src=/image/button15.gif height=80 width=150></a> ';strArray1[1]='<a href=http://www.dearbook.com.cn/2005/c++/ target=_blank><img border=0 src=/image/primer.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/subject/VBzh/ target=_blank><img border=0 src=/image/vb-bt.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=开发答疑&searchtype=0&corder=3&page=1&log=0 target=_blank><img border=0 src=/image/hospital.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/book/SearchBook.aspx?keyword=国外计算机科学教材系列 target=_blank><img border=0 src=/image/WH.jpg height=80 width=150></a> <a href=http://www.dearbook.com.cn/SUBJECT/c++/index.htm target=_blank><img border=0 src=/image/c++.jpg height=80 width=150></a> ';var scrolllen=strArray1.length;marqueesHeight=82;showStr(strArray1,580,1);init_srolltext(1);</script>
</div>
</body>
</html>
2.广告轮显
轮流显示
复制代码 代码如下:
<html>
<head>
<SCRIPT>
var elady_tp=new Array();
var elady_tplink1=new Array();
var elady_tptext=new Array();
var adNumvii=0;
elady_tp[0]="http://pic1.e26.cn/mb/5108/yft/images/1.gif"
elady_tp[1]="http://pic1.e26.cn/mb/5108/yft/images/3.gif"
elady_tp[2]="http://pic1.e26.cn/mb/5108/yft/images/2.gif"
var elady_cimage=new Array();
for (i=1;i<=5;i++){elady_cimage[i]=new Image();
elady_cimage[i].src=elady_tp[i];
}
function set_coelady1(){ if (document.all)
{ elady_tprotator1.filters.revealTrans.Transition=Math.floor(Math.random()*23);
elady_tprotator1.filters.revealTrans.apply(); }
}
function play_coelady1()
{ if (document.all) elady_tprotator1.filters.revealTrans.play()
}function next_elady1(){ if(adNumvii<elady_tp.length-1)adNumvii++ ;
else adNumvii=0;
set_coelady1();
document.images.elady_tprotator1.src=elady_tp[adNumvii];
play_coelady1();
theTimer=setTimeout("next_elady1()", 4000);}
function linkurl1(){ jumpUrl1=elady_tplink1[adNumvii];
jumpTarget1='_blank';
if (jumpUrl1 != ''){ if (jumpTarget1 != '')window.open(jumpUrl1,jumpTarget1);
else location.href=jumpUrl1;
}}
function listMsg1()
{ status=elady_tplink1[adNumvii];
document.returnValue = true;
}
</SCRIPT>
</head>
<body>
<img style="FILTER: revealTrans(duration=2,transition=20)" src="/UploadFiles/2021-04-02/javascript:next_elady1()"></body>
</html>
3.流动广告
流动广告
复制代码 代码如下:
<html>
<head></head>
<body>
<marquee onMouseOver=this.stop() onMouseOut=this.start() scrollamount=5 behavior=alternate>
<table cellspacing=0 cellpadding=2 width="100%" border=0>
<tbody>
<tr>
<td><img src="/UploadFiles/2021-04-02/1301.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1306.gif"><td><img src="/UploadFiles/2021-04-02/1311.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1203.gif"><td><img src="/UploadFiles/2021-04-02/1208.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1219.gif"><td><img src="/UploadFiles/2021-04-02/1224.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1234.gif"><td><img src="/UploadFiles/2021-04-02/1258.gif"><td><img src="http://pic1.e26.cn/mb/5108/yft/images/gun/1280.gif"><td><img src="/UploadFiles/2021-04-02/1356.gif"></tr>
</tbody>
</table>
</marquee>
</body>
</html>
4.移动广告框
移动广告
复制代码 代码如下:
<div id="img" style="LEFT:27px; visibility=hidden;POSITION:absolute; TOP:1115px">
<a href="www.eyou.com" target="_blank">
<img border=0 src="/UploadFiles/2021-04-02/gg.png"></a>
</div>
<script language="javascript">
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.style.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
// End -->
</script>
5.左右底部广告
复制代码 代码如下:
<script type="text/javascript" language="javascript">
var MmyeeAdShow = 3; //1为左侧显示 2为右侧显示 其他为两侧显示
var MmyeeAdWidth =300; //广告宽度
var MmyeeAdHeight = 200; //广告高度
//左边浮动
var AdLeftContent= "<div><iframe id='iframyee' bordercolor='#000000' frameborder='0' hspace='0' marginheight='0' marginwidth='0' scrolling='no' src='http://a311300.cnblogs.com' width='"+MmyeeAdWidth+"' height='"+MmyeeAdHeight+"'></iframe></div>";
//右边浮动
var AdRightContent = "<div><iframe id=iframyee frameborder=0 marginwidth=0 marginheight=0 bordercolor='#000000' hspace='0' scrolling=no src='http://a311300.cnblogs.com' width='"+MmyeeAdWidth+"' height='"+MmyeeAdHeight+"'></iframe></div>"
//漂浮据页面底部设定框值,为了美观请不要修改次参数
var marginTop = 10
//漂浮据边框的距离
var marginLeft = 5
var navUserAgent = navigator.userAgent
function load()
{
judge();
move();
}
function move() {
judge();
setTimeout("move();",80)
}
function judge(){
if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) {
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
}
if (MmyeeAdShow != "1") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth) - MmyeeAdWidth - marginLeft + 'px';
}
}
else{
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
}
if (MmyeeAdShow != "1") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - (MmyeeAdHeight) - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth) - MmyeeAdWidth - marginLeft + 'px';
}
}
if (MmyeeAdShow != "2") {
document.getElementById("adLeftFloat").style.left = marginLeft + 'px';
}
}
if (MmyeeAdShow != "2") {
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + MmyeeAdWidth + ";\"><table border=0 cellpadding=0 cellspacing=0><tr><td>"+AdLeftContent+"</td></tr></table></div>");
}
if (MmyeeAdShow != "1") {
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + MmyeeAdWidth + ";\"><table border=0 cellpadding=0 cellspacing=0><tr><td>"+AdRightContent+"</td></tr></table></div>");
}
load();
</script>
6.左侧浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Left();//载入页面后,调用函数init_Ad_Left().
</script>
<script language="javascript">
<!--
function init_Ad_Left() {
document.all.AdLeftLayer.style.posTop = -200;
//设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdLeftLayer.style.visibility = 'visible'//设置层为可见
MoveLeftLayer('AdLeftLayer');//调用函数MoveLayer()
}
function MoveLeftLayer(layerName)
{
var x = 20;//浮动广告层固定于浏览器的x方向位置
var y = 200;//浮动广告层固定于浏览器的y方向位置
var diff = (document.documentElement.scrollTop + y - document.all.AdLeftLayer.style.posTop)*.90;
var y = document.documentElement.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveLeftLayer('AdLeftLayer');", 0);//设置20毫秒后再调用函数MoveLayer()
}
//-->
</script>
<div id="AdLeftLayer" style='position: absolute; width: 100px; height: 200px; z-index: 20;visibility: visible; left: 20px; top: 100px'>
加入你要放置的内容
<!--嵌入子页-->
<iframe id="iframyee11" allowtransparency='true' bordercolor='#000000' frameborder="0" height='20' hspace='0' marginheight="0" marginwidth="0" scrolling="no" src='Detail.aspx' width='120'></iframe>
dsfsfqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq qqqqqqqq
qqqqq qqqqqqqq qqqqqqqq qqqqqqq
</div>
7.右侧浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Right();//载入页面后,调用函数init_Ad_Right()
</script>
<script language="javascript">
<!--
function init_Ad_Right()
{
document.all.AdRightLayer.style.posTop = -300; //设置onLoad事件激发以后,广告层相对于固定后的y方向位置
document.all.AdRightLayer.style.visibility = 'visible'; //设置层为可见
MoveRightLayer('AdRightLayer'); //调用函数MoveRightLayer()
}
function MoveRightLayer(layerName)
{
var x = 20; //浮动广告层固定于浏览器的x方向位置
var y = 200;//浮动广告层固定于浏览器的y方向位置
var diff = (document.documentElement.scrollTop + y - document.all.AdRightLayer.style.posTop)*.90;
var y = document.documentElement.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posright = x");//移动广告层
setTimeout("MoveRightLayer('AdRightLayer');", 0);//设置20毫秒后再调用函数MoveRightLayer()
}
//-->
</script>
<div id="AdRightLayer" style='position: absolute; width: 100px; height: 200px; z-index: 20;visibility: hidden; right: 30px; top: 600px'>
加入你要放置的内容
<!--嵌入子页-->
<iframe id="iframyee2" allowtransparency='true' bordercolor='#000000' frameborder="0" height='20' hspace='0' marginheight="0" marginwidth="0" scrolling="no" src='Detail.aspx' width='120'></iframe>
hhhhhh hhhhhh hh hhhhhh hhhhhh hhhhhh h hhhhhh hhhhhh hhhhhh hhhhhh hh
</div>
8.左右浮动广告
以下各层不变,在event="onload"中同时加载init_Ad_Left()和 init_Ad_Right()方法
左右浮动广告
复制代码 代码如下:
<script event="onload" for="window" language="javascript">
init_Ad_Left();//载入页面后,调用函数init_Ad_Left()
init_Ad_Right();//载入页面后,调用函数init_Ad_Right()
</script>
9.falsh广告轮显
Flash广告轮显Demo
感谢好友位绰提供此广告展现样式
有兴趣的朋友还可以封装成ASP.NET里的自定义控件。这样使用更为方便。
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月17日
2024年11月17日
- 中国武警男声合唱团《辉煌之声1天路》[DTS-WAV分轨]
- 紫薇《旧曲新韵》[320K/MP3][175.29MB]
- 紫薇《旧曲新韵》[FLAC/分轨][550.18MB]
- 周深《反深代词》[先听版][320K/MP3][72.71MB]
- 李佳薇.2024-会发光的【黑籁音乐】【FLAC分轨】
- 后弦.2012-很有爱【天浩盛世】【WAV+CUE】
- 林俊吉.2012-将你惜命命【美华】【WAV+CUE】
- 晓雅《分享》DTS-WAV
- 黑鸭子2008-飞歌[首版][WAV+CUE]
- 黄乙玲1989-水泼落地难收回[日本天龙版][WAV+CUE]
- 周深《反深代词》[先听版][FLAC/分轨][310.97MB]
- 姜育恒1984《什么时候·串起又散落》台湾复刻版[WAV+CUE][1G]
- 那英《如今》引进版[WAV+CUE][1G]
- 蔡幸娟.1991-真的让我爱你吗【飞碟】【WAV+CUE】
- 群星.2024-好团圆电视剧原声带【TME】【FLAC分轨】