此主题相关图片如下:a.jpg
能力有限 如何将舌签文字垂直居中,谢谢了
代码如下:
<style type="text/css">
.table{
color: #000;
font-family: "宋体", arial;
font-size: 12px;
background: #fff;
text-align: center;
margin: 0;
}
body{
color: #000;
font-family: "宋体", arial;
font-size: 12px;
background: #fff;
text-align: center;
margin: 0;
background-color: #ececec;
}
.nTab{
float: left;
width: 311px;
margin: 0 auto;
border-bottom:1px #bcbcbc solid;
background:#ececec;
background-position:left;
background-repeat:repeat-y;
margin-bottom:2px;
}
.nTab .TabTitle{
clear: both;
height: 30px;
overflow: hidden;
}
.nTab .TabTitle ul{
border:0;
margin:0;
padding:0;
}
.nTab .TabTitle li{
float: left;
width: 100px;
cursor: pointer;
padding-top: 4px;
padding-right: 0px;
padding-left: 0px;
padding-bottom: 2px;
list-style-type: none;
}
.nTab .TabTitle .active{height: 30px;background-image:url(ka1.gif);border-left:0px #bcbcbc solid;border-top:0px #bcbcbc solid;border-right:0px #bcbcbc solid;border-bottom:0px #fff solid;}
.nTab .TabTitle .normal{height: 30px;background-image:url(ka.gif);border:0px #bcbcbc solid;}
.nTab .TabContent{
width:auto;background:#fff;
margin: 0px auto;
padding:10px 0 0 0;
border-right:1px #bcbcbc solid;border-left:1px #bcbcbc solid;
}
.none {display:none;}
#Layer1 {
position:absolute;
left:389px;
top:130px;
width:79px;
height:24px;
z-index:1;
}
</style>
<script type="text/javascript">
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
if (i == Num)
{
thisObj.className = "active";
document.getElementById(tabObj+"_Content"+i).style.display = "block";
}else{
tabList[i].className = "normal";
document.getElementById(tabObj+"_Content"+i).style.display = "none";
}
}
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<div align="center" style="padding-left:25px;">
<table class=table width="311" border="0" cellspacing="0" cellpadding="0">
<tr>
<td ><!-- 选项卡0开始 -->
<div class="nTab">
<!-- 标题开始 -->
<div class="TabTitle">
<ul id="myTab0">
<li class="active" valign="middle" onMouseOver="nTabs(this,0);">
<div align="center" >基本上架</div>
</li>
<li class="normal" onMouseOver="nTabs(this,1);">
<div align="center">热卖商品</div>
</li>
<li class="normal" onMouseOver="nTabs(this,2);">
<div align="center">推荐商品</div>
</li>
</ul>
</div>
<!-- 内容开始 -->
<div class="TabContent">
<div id="myTab0_Content0"> 000</div>
<div id="myTab0_Content1" class="none">111</div>
<div id="myTab0_Content2" class="none">222</div>
</div>
</div>
<p>
<!-- 选项卡0结束 -->
</td>
</tr>
</table>
</div>
</body>
[此贴子已经被作者于2007-10-24 15:39:08编辑过]