滑动门代码,网上很流行

<!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" />
<script>
function dj(i)
{

  for(j=1;j<5;j++)
    {
  if(i==j){
   document.getElementById("a"+j).className="li2";
   document.getElementById("b"+j).style.display="";
          }
   else
    {
   document.getElementById("a"+j).className="li1";
   document.getElementById("b"+j).style.display="none";
      }
     }
 
}
</script>
<title>网上流行的滑动门 </title>
<style>
/* CSS Document */
body { text-align: center; font-family:"宋体", arial;margin:0; padding:0; background: #FFF; font-size:12px; color:#000;}
div,form,img,ul,ol,li,dl,dt,dd {margin: 0; padding: 0; border: 0;}
h1,h2,h3,h4,h5,h6 { margin:0; padding:0;}
table,td,tr,th{font-size:12px;}
/* 链接颜色 */
a:link {color: #1f3a87; text-decoration:none;}
a:visited {color: #83006f;text-decoration:none;}
a:hover {color: #bc2931; text-decoration:underline;}
a:active {color: #bc2931;}
/* 滑动门 */
#c{width:243px; height:22px; margin:0 auto; font-size:12px; border:#94D5F3 1px solid;}
#c ul{ list-style:none; margin:0; padding:0;}
#c .li1 { width:60px; height:22px; display:block;border-bottom: #94D5F3 1px solid;border-right: #94D5F3 1px solid;  background-color: #DBF2FD; float:left;}

#c .li2{ width:60px; height:22px; display:block; border-bottom:none; background-color: #fff; border-right: #94D5F3 1px solid;float:left;}

.txt{ width:243px; height:100px; padding:0;}
</style>

</head>

<body>
新浪,网易这些大站的首页都使用了滑动门,占用空间少,网上很流行。<br>
<div id="c">
<ul>
<li id=a1 class="li1"><a οnclick="dj(1)" href="#">aaa</a></li>
<li id=a2 class="li2"><a οnclick="dj(2)" href="#">bbb</a></li>
<li id=a3 class="li1"><a οnclick="dj(3)" href="#">ccc</a></li>
<li id=a4 class="li1" style="border-right:none"><a οnclick="dj(4)" href="#">ddd</a></li></ul>
<div id=b1 class="txt"><br>新浪,网易这些大站的首页都使用了滑动门,占用空间少,网上很流行</div>
<div id=b2 class="txt" style="display:none"><br><br><a href="http://www.buscx.cn/">http://www.buscx.cn/</a></div>
<div id=b3 class="txt" style="display:none"><br><a href="http://www.bjzbus.cn/">http://www.bjzbus.cn/</a></div>
<div id=b4 class="txt" style="display:none"><br>新浪,网易这些大站的首页都使用了滑动门,占用空间少,网上很流行</div>
</div>
</body>
</html>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
<style type="text/css"> body{ color: #000; font-family: "宋体", arial; font-size: 12px; background: #fff; text-align: center; margin: 0; } .nTab{ float: left; width: 240px; margin: 0 auto; border-bottom:1px #C7C7CD solid; background:#d5d5d5; background-position:left; background-repeat:repeat-y; margin-bottom:2px; } .nTab .TabTitle{ clear: both; height: 26px; overflow: hidden; } .nTab .TabTitle ul{ margin:0; padding:0; } .nTab .TabTitle li{ float: left; width: 60px; cursor: pointer; padding-top: 6px; padding-right: 0px; padding-left: 0px; padding-bottom: 7px; list-style-type: none; } .nTab .TabTitle .active{ background:url(images/finance_nc_080124_ws_001.gif) left -25px no-repeat;border-left:1px #C7C7CD solid;border-top:1px #C7C7CD solid;border-bottom:1px #fff solid;} .nTab .TabTitle .normal{ background:url(images/finance_nc_080124_ws_001.gif);border-top:1px #C7C7CD solid;border-bottom:1px #C7C7CD solid;} .nTab .TabContent{ width:auto;background:#fff; margin: 0px auto; padding:10px 0 0 0; border-right:1px #C7C7CD solid;border-left:1px #C7C7CD solid; } .none {display:none;} </style> <script type="text/javascript"> function nTabs(thisObj,Num){ if(thisObj.className == "active")return; var tabObj = thisObj.parentNode.id; var tabList = document.getElementById(tabObj).getElementsByTagName("li"); for(i=0; i <tabList.length; i++) { if (i == Num) { thisObj.className = "active"; document.getElementById(tabObj+"_Content"+i).style.display = "block"; }else{ tabList[i].className = "normal"; document.getElementById(tabObj+"_Content"+i).style.display = "none"; } } } </script> <!-- 选项卡开始 --> <div class="nTab"> <!-- 标题开始 --> <div class="TabTitle"> <ul id="myTab0"> <li class="active" onClick="nTabs(this,0);">预拔电杆</li> <li class="normal" onClick="nTabs(this,1);">预等电杆</li> <li class="normal" onClick="nTabs(this,2);">普拔电杆</li> <li class="normal" onClick="nTabs(this,3);">部预电杆</li> </ul> </div> <!-- 内容开始 --> <div class="TabContent"> <div id="myTab0_Content0"> 欢迎访问:<a href="http://www.alixixi.com" target="_blank">阿里西西WEB开发 </a></div> <div id="myTab0_Content1" class="none"><a href="http://www.alixixi.com">计源论坛 计源论坛</a></div> <div id="myTab0_Content2" class="none"><a href="http://www.alixixi.com">计源论坛22</a></div> <div id="myTab0_Content3" class="none"><a href="http://www.alixixi.com">计源论坛33</a></div> </div> </div> <!-- 选项卡结束 -->
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值