寻找一种将活动/当前选项卡 css 添加到ddtablemenu的方法。
默认情况下,加载后始终显示第一个选项卡。单击第二个或第三个选项卡后,选项卡颜色变为红色(与悬停相同)。激活或当前时,在底部中心添加 menu-arrow.png (.solidblockmenu li .active)
<div id="ddtabs3" class="solidblockmenu">
<ul>
<li class="active"><a href="#0" data-toggle="tab" rel="sb1" class="firstelement">Home</a></li>
<li><a href="#1" data-toggle="tab" rel="sb2">DHTML</a></li>
<li><a href="#2" data-toggle="tab" rel="sb3">CSS</a></li>
</ul>
</div>
.solidblockmenu ul{margin: 0;padding: 0;float: left;font: bold 13px Arial;width: 100%;border: 1px solid #625e00;border-width: 1px 0;background: black url(http://www.dynamicdrive.com/dynamicindex1/ddtabmenufiles/media/blockdefault.gif) center center repeat-x;
}
.solidblockmenu li a:hover, .solidblockmenu li a.current{color: white;background: transparent url(http://www.dynamicdrive.com/dynamicindex1/ddtabmenufiles/media/blockactive.gif) center center repeat-x;
}
.solidblockmenu li .active { background-image:url(http://www.asiarooms.com/assets/themes/v1/images/areas/details/menu-arrow.png); background-repeat:no-repeat; background-position:bottom center; }
.solidblockmenu a:hover, .solidblockmenu li .active a { background:#310022 none; }
.solidblockmenu li a.firstelement:hover, .solidblockmenu li .active a.firstelement { background-position:left top; }