aspnet下Tab选项卡的使用(整理一)
2009-10-03 10:29
288 查看
在aspnet页面下,我们可能会遇到信息太多,在一个页面的一个屏幕的范围下,可能无法展现出来,这样我们可以考虑使用tab选项卡,写在aspx格式文件的源选项卡中。
下面举一个例子,将代码copy如下,本代码中共使用了三个选项卡:
<head runat="server">
<title>无标题页</title>
<meta content="text/html;charset=gb2312" http-equiv="Content-Type" />
<style type="text/css">
<!--
body,div,ul,li{
padding:0;
text-align:center;
}
body{
font:14px "宋体";
text-align:center;
}
a:link{
color:#00F;
text-decoration:none;
}
a:visited {
color: #00F;
text-decoration:none;
}
a:hover {
color: #c00;
text-decoration:underline;
}
ul{ list-style:none;}
/*选项卡1*/
#Tab1{
width:480px;
margin:0px;
padding:0px;
margin:0 auto;}
/*选项卡2*/
#Tab2{
width:576px;
margin:0px;
padding:0px;
margin:0 auto;}
/*菜单class*/
.Menubox {
width:100%;
height:28px;
line-height:28px;
}
.Menubox ul{
margin:0px;
padding:0px;
}
.Menubox li{
float:left;
display:block;
cursor:pointer;
width:160px;
text-align:center;
color:#949694;
font-weight:bold;
}
.Menubox li.hover{
padding:0px;
background:#fff;
width:158px;
border-left:1px solid #A8C29F;
border-top:1px solid #A8C29F;
border-right:1px solid #A8C29F;
background:#fff;
color:#739242;
font-weight:bold;
height:27px;
line-height:27px;
}
.Contentbox{
clear:both;
margin-top:0px;
border:1px solid #A8C29F;
border-top:none;
height:0px;
text-align:center;
padding-top:8px;
}
--></style>
note:这段代码的作用是为选项卡设置样式,下一步我们写javascript,其目的是当鼠标经过时,显示我们在body字段中设置的div层
下面举一个例子,将代码copy如下,本代码中共使用了三个选项卡:
<head runat="server">
<title>无标题页</title>
<meta content="text/html;charset=gb2312" http-equiv="Content-Type" />
<style type="text/css">
<!--
body,div,ul,li{
padding:0;
text-align:center;
}
body{
font:14px "宋体";
text-align:center;
}
a:link{
color:#00F;
text-decoration:none;
}
a:visited {
color: #00F;
text-decoration:none;
}
a:hover {
color: #c00;
text-decoration:underline;
}
ul{ list-style:none;}
/*选项卡1*/
#Tab1{
width:480px;
margin:0px;
padding:0px;
margin:0 auto;}
/*选项卡2*/
#Tab2{
width:576px;
margin:0px;
padding:0px;
margin:0 auto;}
/*菜单class*/
.Menubox {
width:100%;
height:28px;
line-height:28px;
}
.Menubox ul{
margin:0px;
padding:0px;
}
.Menubox li{
float:left;
display:block;
cursor:pointer;
width:160px;
text-align:center;
color:#949694;
font-weight:bold;
}
.Menubox li.hover{
padding:0px;
background:#fff;
width:158px;
border-left:1px solid #A8C29F;
border-top:1px solid #A8C29F;
border-right:1px solid #A8C29F;
background:#fff;
color:#739242;
font-weight:bold;
height:27px;
line-height:27px;
}
.Contentbox{
clear:both;
margin-top:0px;
border:1px solid #A8C29F;
border-top:none;
height:0px;
text-align:center;
padding-top:8px;
}
--></style>
note:这段代码的作用是为选项卡设置样式,下一步我们写javascript,其目的是当鼠标经过时,显示我们在body字段中设置的div层
相关文章推荐
- aspnet下Tab选项卡的使用(整理二)
- aspnet下Tab选项卡的使用(整理三)
- Android Material Design:滑动指示选项卡android.support.design.widget.TabLayout的简单使用
- ViewPager fragment android tab选项卡的使用
- BootStrap tab选项卡使用小结
- 使用Android Support Design 控件TabLayout 方便快捷实现选项卡功能
- Android中的选项卡(Tab)使用案例
- Android使用TabLayout实现选项卡
- qt4.3.3使用TabWidget关闭选项卡的想法
- 使用Fragment完成Tab选项卡-Android Fragment应用实战
- JS使用面向对象技术实现的tab选项卡效果示例
- 使用TabLayout和Viewpager实现选项卡切换
- 关于easyui在使用tab组件创建选项卡时href方式载入页面遇到的问题
- 使用vue.js简单的tab选项卡效果
- android学习-----使用TabLayout实现Tab选项卡以及遇到的一些问题(一)
- android中使用tab选项卡
- [置顶] Android开发之TabLayout的使用(实现三种常用的选项卡效果)
- Android自定义控件---TabIndicatord选项卡按钮(可用于ViewPager,使用简单)
- 55、实例 使用jQuery设计Tab选项卡
- RadioButton使用(一)实现底部带指示条的Tab选项卡