一个简单的滑动门效果

<!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>DIV+CSS滑动门技术AJAX</title>
<style type="text/css">
<!--
A.mecl {
 COLOR: #ffffff;TEXT-DECORATION: none
}
A.mecl:visited {
 COLOR: #ffffff; TEXT-DECORATION: none; TOP: 1px
}
A.mecl:hover {
 COLOR: #cccccc;
 POSITION: relative;
 TEXT-DECORATION: none;
 TOP: 1px;
 
}
A.ssd {
 COLOR: #000000;TEXT-DECORATION: none
}
A.ssd:visited {
 COLOR: #000000; TEXT-DECORATION: none;
}
A.ssd:hover {
 COLOR:#006600;
 POSITION: relative;
 TEXT-DECORATION: none;

}

#header {
 height: 200px;
 width: 275px;
 margin: auto;
 padding: 0px;
 font-family: "宋体";
 font-size: 12px;
 float: left;
 clear: left;
 border-top-width: 0px;
 border-right-width: 0px;
 border-bottom-width: 0px;
 border-left-width: 0px;
 border-top-style: none;
 border-right-style: none;
 border-bottom-style: none;
 border-left-style: none;
}
#menu {
 margin: 0px;
 padding: 0px;
 list-style-type: none;
}
#menu li {
 display: block;
 width: 68px;
 text-align: center;
 float: left;
 margin: 0px;
 padding-top: 0.2em;
 padding-right: 0px;
 padding-bottom: 0.2em;
 padding-left: 0px;
 cursor: hand;
}
.sec1 { color:#FFFFFF}
.sec2 { color:#00FF00}
.block {
 display: block;
 list-style-type: none;
 text-align: left;
}
.unblock {
 display: none;
 list-style-type: none;
}
.yuanjie {
 margin-left: 5px;
}

-->
</style>
</head>
<body leftmargin="0" topmargin="0" >

<table width="275" height="200" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="275" height="200"><script language=javascript>
function secBoard(n)
{
 for(i=0;i<menu.childNodes.length;i++)
 menu.childNodes[i].className="sec1";
 menu.childNodes[n].className="sec2";
 
 for(i=0;i<main.childNodes.length;i++)
 main.childNodes[i].style.display="none";
 main.childNodes[n].style.display="block";
 
}
</script>

<div id="header">

<table width="275" height="19" border="0" cellspacing="0" cellpadding="0" background="image/cajy-shxw.gif">
  <tr>
    <td> <ul id="menu">
    <li onMouseOver="secBoard(0)" class="sec1"><a href="" target="_blank" class="mecl">社会新闻</a></li>
    <li onMouseOver="secBoard(1)" class="sec1"><a href="" target="_blank" class="mecl">慈善新闻</a></li>
    <li onMouseOver="secBoard(2)" class="sec1"><a href="" target="_blank" class="mecl">慈善事迹</a></li>
    <li onMouseOver="secBoard(3)" class="sec1"><a href="" target="_blank" class="mecl">活动纪实</a></li>
  </ul></td>
  </tr>
</table>


  <!--内容显示区域-->
  <br />
  <table width="288" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="282" align="left"><ul id="main" class="yuanjie">
    <li class="block"> 
   uuuuuuuuuuuu11111111111111111111
   111111
   1111111111111111111
   11111111111111111
   11111111111111
    </li>
 <li class="unblock">
 2222222222222
 2222222222222222
 22222222222222
 22222222222222
 uuuuuuuuu
 </li>
    <li class="unblock">
 33333333333333333
 333333333333333
 333333333333333
 33333333333333333
 hhhhhhhh
    </li>
    <li class="unblock">
 44444444444444444444
 444444444444444
 4444444444444444
 4444444444444444
 444444444444fffffffffffffff
    </li>
  </ul></td>
  </tr>
</table>
  <!--内容显示区域-->
</div></td>
  </tr>
</table>
</body>
</html> 

 

运行一下,看看效果,还不错,呵呵.............

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值