滑动展开/收缩广告代码-演示地址:http:...

海南网站建设,网页设计
记忆工作中的点滴
首页>> 广告代码 >>滑动展开/收缩广告代码

演示地址:http://www.souab.com/Demo/200907/Expansion/

<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312">
<head>
<title> 代码实例:滑动展开/收缩广告_不懂戀愛魚兒</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta name="keywords" content="代码实例:滑动展开/收缩广告" />
<script type="text/javascript">
var intervalId = null;
function slideAd(id,nStayTime,sState,nMaxHth,nMinHth){
  this.stayTime=nStayTime*2000 || 3000; //此处设置时间
  this.maxHeigth=nMaxHth || 90;
  this.minHeigth=nMinHth || 1;
  this.state=sState || "down" ;
  var obj = document.getElementById(id);
  if(intervalId != null)window.clearInterval(intervalId);
  function openBox(){
   var h = obj.offsetHeight;
   obj.style.height = ((this.state == "down") ? (h + 2) : (h - 2))+"px";
    if(obj.offsetHeight>this.maxHeigth){
    window.clearInterval(intervalId);
    intervalId=window.setInterval(closeBox,this.stayTime);
    }
    if (obj.offsetHeight<this.minHeigth){
    window.clearInterval(intervalId);
    obj.style.display="none";
    }
  }
  function closeBox(){
   slideAd(id,this.stayTime,"up",nMaxHth,nMinHth);
  }
  intervalId = window.setInterval(openBox,10);
}
</script>
<style type="text/css">
<!--
html{
 background:#FFF;
}
body{
 font:12px Verdana,Arial,Tahoma;
}
img{
 border:none;
}
ul,li{
 list-style:none;
}

-->
</style>
</head>
<body style="margin:0;padding:0;font-size:14px;">
<div id="MyMoveAd" style="background:#fff;height:12px;overflow:hidden;">
<ul>
 <li><img src="Img.gif"></li>
</ul>
</div>
<p align="center" style="padding:10px;">代码实例:<strong>滑动展开/收缩广告</strong>请刷新页面,再次观看演示效果</p>
<script type="text/javascript">
 <!--
 slideAd('MyMoveAd',2);
-->
</script>
<BR><BR>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><script type="text/javascript"><!--
google_ad_client = "pub-2176993388255317";
/* 728x90, 创建于 09-3-30 */
google_ad_slot = "7010104479";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
        <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  </script>
    </td>
  </tr>
  <tr>
    <td height="8"></td>
  </tr>
  <tr>
    <td align="center"><script type="text/javascript"><!--
google_ad_client = "pub-2176993388255317";
/* 728x15, 创建于 09-2-28 */
google_ad_slot = "7729442397";
google_ad_width = 728;
google_ad_height = 15;
//-->
</script>
        <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  </script></td>
  </tr>
  <tr>
    <td height="8"></td>
  </tr>
  <tr>
    <td align="center"><script type="text/javascript"><!--
google_ad_client = "pub-2176993388255317";
/* 728x90, 创建于 09-3-29 */
google_ad_slot = "3221108693";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
        <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
  </script></td>
  </tr>
</table>
</body>
</html>


×

感谢您的支持,我们会一直保持!

扫码支持
请土豪扫码随意打赏

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

打赏作者
版权所有,转载注意明处:不懂戀愛魚兒 » 滑动展开/收缩广告代码
标签: 广告代码

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)