滑动门技术

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

说明:如果只需要把鼠标移上去便可滑动的将<li id="tb_1" class="hovertab" onclick="x:HoverLi(1);">网站首页</li>改成onmouseover 选项的增加将要相应更改 for(var i=1;i<=6;i++) 将其中的i<=6改成相应的数字

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>滑动门技术_不懂戀愛魚兒</title>
<style media="screen" type="text/css">
<!--
*{font-size:12px;}
html,body{margin:0;text-align:center;over-flow:hidden;height:100%;width:100%; line-height:34px;}
UL{list-style-type:none; margin:0px;}
img{border:none;}
a{color:#3366CC;text-decoration:none;}
a:hover{color:#F33;text-decoration:underline;}
/* 标准盒模型 */
.ttl{height:18px;}
.ctt{height:auto; background:#FFFFFF;padding:6px;clear:both;border:1px solid #cacaca;border-top:0;text-align:left;}
.table{margin:2px 0;clear:both;width:728px; margin-top:100px;/*这里调整整个滑动门的宽度*/}
/* TAB 切换效果 */
.tb_{background-image: url('b1.gif'); background-repeat: repeat-x;background-color: #FFFFFF;}
.tb_ ul{height:24px;}
.tb_ li{float:left;height: 24px;line-height:1.9;width: 94px;cursor:pointer;}
/* 用于控制显示与隐藏的css类 */
.normaltab   { background-image:url('off.gif'); background-repeat: no-repeat; color:#2388be ;}
.hovertab    { background-image: url('on.gif'); background-repeat: no-repeat; color:#2388be; font-weight:bold }
.dis{display:block;}
.undis{display:none;}
-->
</style>
<script type="text/javascript" language="javascript">
//<!CDATA[
function g(o){return document.getElementById(o);}
function HoverLi(n){
//如果有N个标签,就将i<=N;
//本功能非常OK,兼容IE7,FF,IE6
for(var i=1;i<=6;i++){g('tb_'+i).className='normaltab';g('tbc_0'+i).className='undis';}g('tbc_0'+n).className='dis';g('tb_'+n).className='hovertab';
}
//如果要做成点击后再转到请将<li>中的 onclick改成 onmouseover;
//]]>
</script>
</head>
<body>
<div class="table">
 <div id="tb_" class="tb_">
   <ul>
    <li id="tb_1" class="hovertab" onclick="x:HoverLi(1);">网站首页</li>
    <li id="tb_2" class="normaltab" onclick="i:HoverLi(2);">网站建设</li>
    <li id="tb_3" class="normaltab" onclick="a:HoverLi(3);">虚拟主机</li>
    <li id="tb_4" class="normaltab" onclick="o:HoverLi(4);">新闻资讯</li>
    <li id="tb_5" class="normaltab" onclick="g:HoverLi(5);">客户案例</li>
    <li id="tb_6" class="normaltab" onclick="z:HoverLi(6);">联系我们</li>
   </ul>
 </div>
 <div class="ctt">
  <div class="dis" id="tbc_01"><a href="http://www.hneyang.com/" target="_blank" title="海南易阳网络,网站建设">海南易阳网络</a></div>
  <div class="undis" id="tbc_02">海南易阳网络<BR />提供网站建设.虚拟空间.</div>
  <div class="undis" id="tbc_03">虚拟主机<BR />提供网站建设.虚拟空间.</div>
  <div class="undis" id="tbc_04">新闻资讯</div>
  <div class="undis" id="tbc_05">客户案例</div>
  <div class="undis" id="tbc_06"><a href="http://www.hneyang.com/" target="_blank" title="海南易阳网络,网站建设">海南易阳网络</a>
  </div>
 </div>
</div>
<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>

附件下载:
Hua.rar 4.67KB

引用地址:

post by 不懂戀愛魚兒 | 2009年7月9日 | 归档于 [TAB标签]
标签: 特效 滑动门
  1. 腾飞蝶艺
    2009-07-21 10:20| #1

    不错这个。收藏了。

发表评论

sitemap