+ -
当前位置:首页 → 问答吧 → tab选项卡效果

tab选项卡效果

时间:2010-05-25

来源:互联网

TM截图未命名tab.png (5.57 KB)
选项卡效果
2010-5-25 18:24

TM截图未命名2.png (4.42 KB)
选项卡效果2
2010-5-25 18:28

3.png (3.59 KB)
选项卡效果3
2010-5-25 18:28

各位大虾看下这种效果,我是做成背景色,但具体实现起来背景有重复
源页面代码:
<div class="TabTitle">
      <ul id="myTab1">
        <li id="t1" class="active" onclick="nTabs(this,0);"><span class="t1_left"></span><span class="czx_title_1">选项1</span><span class="t1_right"></span></li>
        <li id="t2"  class="normal" onclick="nTabs(this,1);"><span class="czx_title_1">选项2</span></li>
      </ul>
    </div>
css页面代码
.nTab{float: left;width:100%;}
.nTab .TabTitle{clear: both;height:22px;width:730px;}
.nTab .TabTitle ul{width:730px;height:22px; }
.nTab .TabTitle li{list-style-type: none; background:#CC3300;text-align:center;margin: 0;}
.active{background:url(../images/b2.jpg) bottom no-repeat; width:133px; display:block; float:left;}
.normal{background:url(../images/a2.jpg) bottom no-repeat; width:133px; display:block;float:left;}
#t1.active{background:url(../images/a1.jpg) bottom no-repeat; width:133px;display:block; float:left; }
#t2.normal{background:url(../images/b1.jpg) bottom no-repeat; width:133px;display:block; float:left;}

两个选项可能实现,多个就出问题了,有何方法解决?

[ 本帖最后由 bailinxin 于 2010-5-25 18:28 编辑 ]

作者: bailinxin   发布时间: 2010-05-25

北京重复,加no-repeat

作者: iaw2001200   发布时间: 2010-05-26

围观

作者: cwq2jxl   发布时间: 2010-05-26

相关阅读 更多