動畫標籤

要使標籤淡入,請將 .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>