dw 选项卡

选项卡实现代码:
<!DOCTYPE html>
<!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=utf-8" />
<title>无标题文档</title>
<style>
#biaodan {
	height: 600px;
	width: 365px;
	padding-top: 100px;
	margin-top: 0px;
	margin-right: auto;
	margin-bottom: 0px;
	margin-left: auto;
	font: "微软雅黑" 14px/30px;
}
body {
	margin: 0px;
	padding: 0px;
}
#shang{
	height: 30;
	text-align: center;
	border-Top: 3px solid #060;
	line-height: 30px;
	vertical-align: middle;
	}
#xia {
	height: 500px;
}
#junshi ul ,#zhengzhi ul,#wenhua ul{
	list-style-type: none;
}
a:link,a:visited,a:hover{
	text-decoration:none;
	}	
#zhengzhi,#wenhua{
	display:none;
	}
#biaodan #sp-junshi{
	width: 120px;
	height: 29px;
	border-left: 1px solid #666;
	border-right: 1px solid #666;
	float: left;
	border-bottom: none;
	background-color:none;
}
#biaodan #sp-zhengzhi{
	width: 120px;
	height: 29px;
	border-right: 1px solid #666;
	border-bottom: 1px solid #666;
	background-color: #cfcfcf;
	float: left;
}
#biaodan #sp-wenhua{
	width: 120px;
	height: 29px;
	border-right: 1px solid #666;
	border-bottom: 1px solid #666;
	background-color: #cfcfcf;
	float: left;
}
body {
	margin: 0px;
	padding: 0px;
}
</style>
<script>
function xianshijunshi(){
	//军事显示
	document.getElementById("junshi").style.display = "block";
	//政治隐藏
	document.getElementById("zhengzhi").style.display = "none";
	//文化隐藏
	document.getElementById("wenhua").style.display = "none";
	document.getElementById("sp-junshi").style.background = "none"
	document.getElementById("sp-zhengzhi").style.background ="#cfcfcf";
	document.getElementById("sp-wenhua").style.background ="#cfcfcf";
	document.getElementById("sp-junshi").style.borderBottom = "none"; 
	document.getElementById("sp-zhengzhi").style.borderBottom = "1px solid #666";
	document.getElementById("sp-wenhua").style.borderBottom = "1px solid #666";
	}
function xianshizhengzhi(){
	//军事隐藏
	document.getElementById("junshi").style.display = "none";
	//政治显示
	document.getElementById("zhengzhi").style.display = "block";
	//文化隐藏
	document.getElementById("wenhua").style.display = "none";
	document.getElementById("sp-junshi").style.background = "#cfcfcf"
	document.getElementById("sp-zhengzhi").style.background ="none";
	document.getElementById("sp-wenhua").style.background ="#cfcfcf";
	document.getElementById("sp-junshi").style.borderBottom = "1px solid #666"; 
	document.getElementById("sp-zhengzhi").style.borderBottom = "none";
	document.getElementById("sp-wenhua").style.borderBottom = "1px solid #666";
	}
function xianshiwenhua(){
	//军事隐藏
	document.getElementById("junshi").style.display = "none";
	//政治隐藏
	document.getElementById("zhengzhi").style.display = "none";
	//文化显示
	document.getElementById("wenhua").style.display = "block";
	document.getElementById("sp-junshi").style.background = "#cfcfcf"
	document.getElementById("sp-zhengzhi").style.background ="#cfcfcf";
	document.getElementById("sp-wenhua").style.background ="none"
	document.getElementById("sp-junshi").style.borderBottom = "1px solid #666"; 
	document.getElementById("sp-zhengzhi").style.borderBottom = "1px solid #666";
	document.getElementById("sp-wenhua").style.borderBottom = "none";
	}
</script>
</head>
<body>
<div id="biaodan">
  <div id="shang" >
    <div id="sp-junshi" class="s1" onMouseover="xianshijunshi()">军事</div>
    <div id="sp-zhengzhi" class="s2" onMouseover="xianshizhengzhi()">政治</div>
    <div id="sp-wenhua" class="s3" onMouseover="xianshiwenhua()">文化</div>
    <div style="clear:both;"></div>
  </div>
  <div id="xia">
    <div id="junshi" class ="info">
      <ul>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
        <li><a href="#">军事军事军事军事军事军事军事军事</a></li>
      </ul>
    </div>
    <div id="zhengzhi" class ="info">
      <ul>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
        <li><a href="#">政治政治政治政治政治政治政治政治</a></li>
      </ul>
    </div>
    <div id="wenhua" class ="info">
      <ul>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
        <li><a href="#">文化文化文化文化文化文化文化文化</a></li>
      </ul>
    </div>
  </div>
</div>
</body>
</html>


选项卡实现页面


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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值