Skip navigation.

yunbo.tao's Space

学习将陪着我过一生。

用DIV+CSS修改了一个表格做的滑动门[仅能在IE下运行]

<!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 type="text/css">
<!--
#header {
 background-color: #F8F4EF;
 height: 200px;
 width: 400px;
 margin: 0px;
 padding: 0px;
 border: 1px solid #ECE1D5;
 font-family: "宋体";
 font-size: 12px;
}
#menu {
 margin: 0px;
 padding: 0px;
 list-style-type: none;
}
#menu li {
 display: block;
 width: 100px;
 text-align: center;
 float: left;
 margin: 0px;
 padding-top: 0.2em;
 padding-right: 0px;
 padding-bottom: 0.2em;
 padding-left: 0px;
 cursor: hand;
}
.sec1 { background-color: #FFFFCC;}
.sec2 { background-color: #00CCFF;}
.block { display: block;}
.unblock { display: none;}
-->
</style>
</head>
<body>
<scrīpt language=javascrīpt>
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";
 
}
</scrīpt>
<div id="header">
  <ul id="menu">
    <li ōnMouseOver="secBoard(0)" class="sec2">六安新闻</li>
    <li ōnMouseOver="secBoard(1)" class="sec1">校园新闻</li>
    <li ōnMouseOver="secBoard(2)" class="sec1">最新日志</li>
    <li ōnMouseOver="secBoard(3)" class="sec1">论坛新帖</li>
  </ul>
  <!--内容显示区域-->
  <ul id="main">
    <li class="block">第一个内容</li>
    <li class="unblock">第二个内容</li>
    <li class="unblock">第三个内容</li>
    <li class="unblock">第四个内容</li>
  </ul>
  <!--内容显示区域-->
</div>
</body>
</html>

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31