<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>簡(jiǎn)單選項(xiàng)卡</title>
<style type="text/css">
body,ul,li{margin:0;padding:0;}
body{font:12px/1.5 Tahoma;}
#outer{width:450px;margin:10px auto;}
#tab{overflow:hidden;zoom:1;background:#000;border:1px solid #000;}
#tab li{float:left;color:#fff;height:30px;cursor:pointer;line-height:30px;list-style-type:none;padding:0 20px;}
#tab li.current{color:#000;background:#ccc;}
#content{border:1px solid #000;border-top-width:0;}
#content ul{line-height:25px;display:none;margin:0 30px;padding:10px 0;}
</style>
<script type="text/javascript">
window.onload = function ()
{
var oLi = document.getElementById("tab").getElementsByTagName("li");
var oUl = document.getElementById("content").getElementsByTagName("ul");
for(var i = 0; i < oLi.length; i++)
{
oLi[i].index = i;
oLi[i].onmouseover = function (){
for(var n = 0;n < oLi.length;n++)
{
oLi[n].className = "";
this.className = "current";
}
for(var n = 0;n <oUl.length;n++)
{
oUl[n].style.display = "none";
oUl[this.index].style.display="block";
}
}
}
}
</script>
</head>
<body>
<div id="outer">
<ul id="tab">
<li class="current">科技</li>
<li>旅游</li>
<li>娛樂(lè)</li>
</ul>
<div id="content">
<ul style="display:block;">
<li>宏
主站蜘蛛池模板:
千阳县|
涡阳县|
长治县|
永春县|
英山县|
望江县|
仁怀市|
华阴市|
衡东县|
临澧县|
蓝山县|
灵丘县|
广平县|
卓尼县|
灵山县|
铁岭市|
离岛区|
宁明县|
延寿县|
仙游县|
昌吉市|
松潘县|
信宜市|
仲巴县|
宁城县|
观塘区|
宝鸡市|
延川县|
蓬安县|
永春县|
尖扎县|
竹山县|
德化县|
从江县|
明光市|
富民县|
仁布县|
台中市|
东乌|
色达县|
英山县|