<!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" />
<style type="text/css">
a {
color:#000000;
text-decoration:none;
}
#header {
float:left;
width:100%;
background:#D3D3D3;
font-size:93%;
line-height:normal;
}
#header ul {
margin:0;
padding:0px;
list-style:none;
}
#header li {
float:left;
background:#DCE1EF;
border:solid 1px #8EA2C2;
margin-left:2px;
padding:0px;
}
#header a {
display:block;
padding:5px 15px 4px;
}
#header .current {
background:#FFFFFF;
border-left:solid 1px #8EA2C2;
border-top:solid 1px #8EA2C2;
border-right:solid 1px #8EA2C2;
border-bottom:solid 0px #8EA2C2;
}
#header .current a{
padding-bottom:5px;
}
.content {
margin-top:10px;
}
.content .contentHeader {
background-color:#BCC7E0;
border:solid 1px #4B66A5;
font-weight:bold;
}
.content .contentMain {
border-left:solid 1px #4B66A5;
border-top:solid 0px #4B66A5;
border-right:solid 1px #4B66A5;
border-bottom:solid 1px #4B66A5;
}
</style>
<script type="text/javascript">
function change_option(number,index){
for (var i = 1; i <= number; i++) {
document.getElementById('current' + i).className = '';
document.getElementById('content' + i).style.display = 'none';
}
document.getElementById('current' + index).className = 'current';
document.getElementById('content' + index).style.display = 'block';
}
</script>
<title>CSS中的滑动门技术</title>
</head>
<body>
<div id="navbar">
<div id="header">
<ul>
<li id="current1"><a href="#" οnclick="change_option(3,1);">唐诗三百首</a></li>
<li id="current2"><a href="#" οnclick="change_option(3,2);">宋词精选</a></li>
<li id="current3"><a href="#" οnclick="change_option(3,3);">明清小说</a></li>
</ul>
</div>
<div id="content1" class="content">
<div class="contentHeader">唐诗三百首</div>
<div class="contentMain">关山月<br />
明月出天山,苍茫云海间。<br />
长风几万里,吹度玉门关。<br />
汉下白登道,胡窥青海湾。<br />
由来征战地,不见有人还。<br />
戍客望边色,思归多苦颜。<br />
高楼当此夜,叹息未应闲。</div>
</div>
<div id="content2" class="content" style="display:none">
<div class="contentHeader">宋词精选</div>
<div class="contentMain">清平乐<br />
<br />
春归何处<br />
寂寞无行路。<br />
若有人知春去处。<br />
唤取归来同住。<br />
<br />
春无踪迹谁知。<br />
除非问取黄鹂。<br />
百啭无人能解,因风飞过蔷薇。</div>
</div>
<div id="content3" class="content" style="display:none">
<div class="contentHeader">明清小说</div>
<div class="contentMain">三国演义<br />
滚滚长江东逝水,浪花淘尽英雄。<br />
是非成败转头空,青山依旧在几度夕阳红。</div>
</div>
</div>
</body>
</html>