四屏选项卡
来源:互联网 发布:java new object 赋值 编辑:程序博客网 时间:2024/05/16 11:57
代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<title>简洁Tab</title>
<script type="text/javascript" language="javascript1.2" src="js/gundong.js"></script>
<style type="text/css">
*{margin:0 auto; padding:0; border:0;}
ul li{margin:0; padding:0; list-style:none;}
#Tab{width:400px; height:272px;}
/*菜单class*/
.Menubox {width:100%; height:30px; line-height:30px;}
.Menubox ul{margin:0px;padding:0px;}
.Menubox li{float:left; display:block; cursor:pointer; width:100px; text-align:center; color:#949694; font-weight:bold; background:green;}
.Menubox li.hover{height:30px;line-height:30px; color:#739242; font-weight:bold; background:red;}
.Contentbox{height:242px; background:blue;}
</style>
<script type="text/javascript">
// JavaScript Document
<!--
function setTab(name,cursel,n){
for(i=1;i<=n;i++){
var menu=document.getElementById(name+i);
var con=document.getElementById("con_"+name+"_"+i);
menu.className=i==cursel?"hover":"";
con.style.display=i==cursel?"block":"none";
}
}
//-->
</script>
</head>
<body>
<div id="Tab">
<div class="Menubox">
<ul>
<li id="one1" onclick="setTab('one',1,4)" class="hover">新闻1</li>
<li id="one2" onclick="setTab('one',2,4)" >新闻2</li>
<li id="one3" onclick="setTab('one',3,4)">新闻3</li>
<li id="one4" onclick="setTab('one',4,4)">新闻4</li>
</ul>
</div>
<div class="Contentbox">
<div id="con_one_1" class="hover">新闻列表1</div>
<div id="con_one_2" style="display:none">新闻列表2</div>
<div id="con_one_3" style="display:none">新闻列表3</div>
<div id="con_one_4" style="display:none">新闻列表4</div>
</div>
</div>
</body>
</html>
- 四屏选项卡
- 浅谈Android选项卡(四)
- 四行代码编写出选项卡效果
- 四种Tab选项卡d的方法
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- 选项卡
- MFC非模态对话框的销毁
- C#验证码下载
- word2003按空格键为什么会出现小数点
- java向mysql数据库插入中文时乱码
- request.getRemoteAddr()获取的值为0:0:0:0:0:0:0:1
- 四屏选项卡
- PadLeft例子
- C#调用word打印
- MFMailComposeViewController发送邮件的实例
- js join方法
- UITableview cell上的数据或控件覆盖问题。
- fprintf
- WIN7安装IE9 未能完成安装
- Android对Bitmap的高效使用总结(Google给的bitmap终极方案)