动画标签

要使标签淡入,请将 .fade 添加到每个 .tab-pane。活动选项卡窗格还必须具有 .in 类才能使初始内容可见。

<ul class="nav nav-tabs" role="tablist">
    <li role="presentation">
        <a href="#id-of-content-1" role="tab" data-toggle="tab">
            Tab 1
        </a>
    </li>
    <li role="presentation" class="active">
        <a href="#id-of-content-2" role="tab" data-toggle="tab">
            Tab 2
        </a>
    </li>
    <li role="presentation">
        <a href="#id-of-content-3" role="tab" data-toggle="tab">
            Tab 3
        </a>
    </li>
</ul>

<div class="tab-content">
    <div role="tabpanel" id="id-of-content-1" class="tab-pane fade">
        Tab content 1
    </div>
    <div role="tabpanel" id="id-of-content-2" class="tab-pane fade active in">
        Tab content 2
    </div>
    <div role="tabpanel" id="id-of-content-3" class="tab-pane fade">
        Tab content 3
    </div>
</div>