亚洲一区二区三区在线播放,伊人久久精品无码av一区,亚洲国产精品一区二区第一页免,无码aⅴ精品一区二区三区浪潮

導航和選項卡(Navs & tabs)

有關如何使用 Bootstrap附帶的導航組件的文檔和示例。

基礎導航

Bootstrap 中可用的導航共享常規標記和樣式,從base.nav類到活動和禁用狀態。交換修改器類以在每個樣式之間切換。

Nav組件是用FlexBox構建的,為構建所有類型的導航組件提供了堅實的基礎。它包括一些樣式覆蓋(用于處理列表)、一些鏈接填充(用于較大的命中區域)和基本的禁用樣式。

基礎導航組件不包括任何.active狀態。下面的例子包括這個類,主要是為了證明這個特定的類不會觸發任何特殊的樣式。

要將活動狀態傳遞給輔助技術,請使用aria-current屬性-使用當前頁面的頁面值,或使用集合中當前項的true。

<ul class="nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

class可以使用在很多地方,因此您的標記可以超級靈活。如果項目的順序很重要,可以使用與ul類似的ol,或者使用nav元素。因為.nav使用display: flex,因此nav-link與nav-item的行為一樣,卻不需要有額外的標記。

<nav class="nav">
<a class="nav-link active" aria-current="page" href="#">Active</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</nav>

可用樣式

使用修飾符、通用類別更改.nav元件的樣式。依據需要混合搭配或自行建立。

水平對齊

使用flexbox通用類別更改導航的水平對齊方式。預設情況下導航會向左對齊,但您可以輕松地將其更改為向中心或向右對齊。

使用.justify-content-center置中對齊:

<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

使用.justify-content-end靠右對齊:

<ul class="nav justify-content-end">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

垂直

通過使用.flex-column通用類別更改flex的軸線方向以堆疊導航。如果只希望在特定的viewports下堆疊,可使用響應式版本(例如.flex-sm-column)。

<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

像往常一樣,垂直導航也可以不用ul。

<nav class="nav flex-column">
<a class="nav-link active" aria-current="page" href="#">Active</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</nav>

選項卡

使用基本的導航,并加入.nav-tabs以生成具有分頁標簽的界面。透過我們的分頁JavaScript插件來創造可切換的塊。

<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

膠囊

使用相同的HTML,但使用.nav-pills取代:

<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

填充并對齊

.nav內容有兩種寬度擴展用的Class,使用.nav-fill會將.nav-item內容按照比例分配空間。注意,這會占用所有的水平空間,但并不是每個導航項目都具有相同寬度。

<ul class="nav nav-pills nav-fill">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Much longer nav link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

當使用nav導航時,您可以忽略.nav-item,因為客制化a元素的樣式僅需要.nav-link。

<nav class="nav nav-pills nav-fill">
<a class="nav-link active" aria-current="page" href="#">Active</a>
<a class="nav-link" href="#">Much longer nav link</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</nav>

創建等寬元素請使用.nav-justified。所有的水平空間將被導航連接占據,但與上面的.nav-fill不同,每個導航項都將是相同的寬度。

<ul class="nav nav-pills nav-justified">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Much longer nav link</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

與使用nav導航中的.nav-fill示例類似。

<nav class="nav nav-pills nav-justified">
<a class="nav-link active" aria-current="page" href="#">Active</a>
<a class="nav-link" href="#">Much longer nav link</a>
<a class="nav-link" href="#">Link</a>
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</nav>

使用flex實用程序

如果需要響應式的導航變化,請使用一系列flexbox通用類別。這些通用類別在斷點之間提供更多的自定義設定。在下面的示例中,我們的導航將在最小斷點以下堆疊,并從small斷點開始采用水平排版以填滿所有可用寬度。

<nav class="nav nav-pills flex-column flex-sm-row">
<a class="flex-sm-fill text-sm-center nav-link active" aria-current="page" href="#">Active</a>
<a class="flex-sm-fill text-sm-center nav-link" href="#">Longer nav link</a>
<a class="flex-sm-fill text-sm-center nav-link" href="#">Link</a>
<a class="flex-sm-fill text-sm-center nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</nav>

關于可訪問性

如果您是將導航當作導航條使用,那么請務必確保在符合邏輯的ul之父容器上加入role=“navigation”,或使用nav元素包裝整個導航條。不要在ul本身添加role,因為這樣做將會阻止輔助技術將其聲明為列表。

請注意,即使導航條的視覺樣式透過.nav-tabs而呈現為分頁標簽,也應該不會被賦予role=“tablist”,role=“tab”或role=“tabpanel”屬性。這些僅適用于動態分頁標簽界面,如WAI ARIA Authoring Practices中描述。相關示例,請參閱本節中的JavaScript behavior。在動態選項界面上不需要aria-current屬性,因為我們的JavaScript透過在活動頁簽上添加aria-selected=“true”來處理標明狀態。

使用下拉列表

加入額外的HTML和下拉菜單JavaScript插件

帶下拉列表的選項卡

<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

帶下拉列表的膠囊

<ul class="nav nav-pills">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Active</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Dropdown</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
</li>
</ul>

Sass

Variables

$nav-link-padding-y:                .5rem;
$nav-link-padding-x:                1rem;
$nav-link-font-size:                null;
$nav-link-font-weight:              null;
$nav-link-color:                    null;
$nav-link-hover-color:              null;
$nav-link-transition:               color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
$nav-link-disabled-color:           $gray-600;

$nav-tabs-border-color:             $gray-300;
$nav-tabs-border-width:             $border-width;
$nav-tabs-border-radius:            $border-radius;
$nav-tabs-link-hover-border-color:  $gray-200 $gray-200 $nav-tabs-border-color;
$nav-tabs-link-active-color:        $gray-700;
$nav-tabs-link-active-bg:           $body-bg;
$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg;

$nav-pills-border-radius:           $border-radius;
$nav-pills-link-active-color:       $component-active-color;
$nav-pills-link-active-bg:          $component-active-bg;

JavaScript行為

使用JavaScript分頁標簽插件-單獨或透過編譯的bootstrap.js檔-擴展我們的導航分頁標簽和膠囊狀分頁,以創建可選的分頁標簽、甚至是下拉菜單。

態頁簽界面,如WAI ARIA Authoring Practices所描述,需要role=“tablist”、role=“tab”,role=“tabpanel”和附加的aria-屬性,向用戶提供輔助技術(如屏幕閱讀器)的結構、功能和當前狀態。

請注意,動態頁簽應該不包含下拉菜單,因為這會導致可用性和親和性問題。從可用性的角度來看,當前顯示的選項卡的觸發器元素不會立即顯示(因為它在關閉的下拉菜單中)可能會導致混淆。從親和性的角度來看,目前還沒有明確的方式將這種結構對應到標準的WAI ARIA模式,這意味著不能容易地被用戶的輔助技術所理解。

Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.

Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.

Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.

<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#contact" type="button" role="tab" aria-controls="contact" aria-selected="false">Contact</button>
</li>
</ul>
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">...</div>
</div>

為了滿足您的需求,它可以與基于ul的標簽(如上所示)一起使用,也可以與任意“roll your own”標記一起使用。請注意,如果您使用的是nav,則不應直接向其中添加role=“tablist”,因為這會復寫該元素原生的role。取而代之的是,切換到其他元素(在下面的示例中為簡單的div),然后用nav包裝起來。

Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.

Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.

Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.

<nav>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
<button class="nav-link active" id="nav-home-tab" data-bs-toggle="tab" data-bs-target="#nav-home" type="button" role="tab" aria-controls="nav-home" aria-selected="true">Home</button>
<button class="nav-link" id="nav-profile-tab" data-bs-toggle="tab" data-bs-target="#nav-profile" type="button" role="tab" aria-controls="nav-profile" aria-selected="false">Profile</button>
<button class="nav-link" id="nav-contact-tab" data-bs-toggle="tab" data-bs-target="#nav-contact" type="button" role="tab" aria-controls="nav-contact" aria-selected="false">Contact</button>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-home" role="tabpanel" aria-labelledby="nav-home-tab">...</div>
<div class="tab-pane fade" id="nav-profile" role="tabpanel" aria-labelledby="nav-profile-tab">...</div>
<div class="tab-pane fade" id="nav-contact" role="tabpanel" aria-labelledby="nav-contact-tab">...</div>
</div>

標簽分頁插件也能使用于膠囊狀頁簽。

Placeholder content for the tab panel. This one relates to the home tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.

Placeholder content for the tab panel. This one relates to the profile tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.

Placeholder content for the tab panel. This one relates to the contact tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.

<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="pills-home-tab" data-bs-toggle="pill" data-bs-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="pills-profile-tab" data-bs-toggle="pill" data-bs-target="#pills-profile" type="button" role="tab" aria-controls="pills-profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="pills-contact-tab" data-bs-toggle="pill" data-bs-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Contact</button>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">...</div>
<div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">...</div>
<div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">...</div>
</div>

還有搭配垂直膠囊狀頁簽。

Placeholder content for the tab panel. This one relates to the home tab. Saw you downtown singing the Blues. Watch you circle the drain. Why don't you let me stop by? Heavy is the head that wears the crown. Yes, we make angels cry, raining down on earth from up above. Wanna see the show in 3D, a movie. Do you ever feel, feel so paper thin. It’s a yes or no, no maybe.

Placeholder content for the tab panel. This one relates to the profile tab. Takes you miles high, so high, 'cause she’s got that one international smile. There's a stranger in my bed, there's a pounding in my head. Oh, no. In another life I would make you stay. ‘Cause I, I’m capable of anything. Suiting up for my crowning battle. Used to steal your parents' liquor and climb to the roof. Tone, tan fit and ready, turn it up cause its gettin' heavy. Her love is like a drug. I guess that I forgot I had a choice.

Placeholder content for the tab panel. This one relates to the messages tab. You got the finest architecture. Passport stamps, she's cosmopolitan. Fine, fresh, fierce, we got it on lock. Never planned that one day I'd be losing you. She eats your heart out. Your kiss is cosmic, every move is magic. I mean the ones, I mean like she's the one. Greetings loved ones let's take a journey. Just own the night like the 4th of July! But you'd rather get wasted.

Placeholder content for the tab panel. This one relates to the settings tab. Her love is like a drug. All my girls vintage Chanel baby. Got a motel and built a fort out of sheets. 'Cause she's the muse and the artist. (This is how we do) So you wanna play with magic. So just be sure before you give it all to me. I'm walking, I'm walking on air (tonight). Skip the talk, heard it all, time to walk the walk. Catch her if you can. Stinging like a bee I earned my stripes.

<div class="d-flex align-items-start">
<div class="nav flex-column nav-pills me-3" id="v-pills-tab" role="tablist" aria-orientation="vertical">
<button class="nav-link active" id="v-pills-home-tab" data-bs-toggle="pill" data-bs-target="#v-pills-home" type="button" role="tab" aria-controls="v-pills-home" aria-selected="true">Home</button>
<button class="nav-link" id="v-pills-profile-tab" data-bs-toggle="pill" data-bs-target="#v-pills-profile" type="button" role="tab" aria-controls="v-pills-profile" aria-selected="false">Profile</button>
<button class="nav-link" id="v-pills-messages-tab" data-bs-toggle="pill" data-bs-target="#v-pills-messages" type="button" role="tab" aria-controls="v-pills-messages" aria-selected="false">Messages</button>
<button class="nav-link" id="v-pills-settings-tab" data-bs-toggle="pill" data-bs-target="#v-pills-settings" type="button" role="tab" aria-controls="v-pills-settings" aria-selected="false">Settings</button>
</div>
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab">...</div>
<div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab">...</div>
<div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab">...</div>
<div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab">...</div>
</div>
</div>

使用數據屬性

只需在元素上指定data-bs-toggle=“tab”或data-bs-toggle=“pill”即可啟動標簽或膠囊狀導航,而無需編寫任何JavaScript。可在.nav-tabs或.nav-pills上使用這些數據屬性

<!-- Nav tabs -->
<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">Messages</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings" type="button" role="tab" aria-controls="settings" aria-selected="false">Settings</button>
</li>
</ul>

<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane" id="messages" role="tabpanel" aria-labelledby="messages-tab">...</div>
<div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">...</div>
</div>

通過JavaScript

透過JavaScript啟用分頁標簽(每一個分頁標簽需要分別啟動):

var triggerTabList = [].slice.call(document.querySelectorAll('#myTab a'))
triggerTabList.forEach(function (triggerEl) {
var tabTrigger = new bootstrap.Tab(triggerEl)

triggerEl.addEventListener('click', function (event) {
event.preventDefault()
tabTrigger.show()
})
})

啟用分頁標簽有以下數種方法:

var triggerEl = document.querySelector('#myTab a[href="#profile"]')
bootstrap.Tab.getInstance(triggerEl).show() // Select tab by name

var triggerFirstTabEl = document.querySelector('#myTab li:first-child a')
bootstrap.Tab.getInstance(triggerFirstTabEl).show() // Select first tab

淡入效果

要使分頁標簽淡入淡出,請將.fade加到每個.tab-pane中。第一個分頁內容還必須具有.show以使初始內容可見。

<div class="tab-content">
<div class="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane fade" id="messages" role="tabpanel" aria-labelledby="messages-tab">...</div>
<div class="tab-pane fade" id="settings" role="tabpanel" aria-labelledby="settings-tab">...</div>
</div>

方法

Asynchronous methods and transitions

All API methods are asynchronous and start a transition. They return to the caller as soon as the transition is started but before it ends. In addition, a method call on a transitioning component will be ignored.

See our JavaScript documentation for more information.

構造

啟動分頁標簽元素和內容容器。標簽應該有一個data-bs-target或href定位在DOM中的一個容器節點。

<ul class="nav nav-tabs" id="myTab" role="tablist">
<li class="nav-item" role="presentation">
<button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#home" type="button" role="tab" aria-controls="home" aria-selected="true">Home</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="profile" aria-selected="false">Profile</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="messages" aria-selected="false">Messages</button>
</li>
<li class="nav-item" role="presentation">
<button class="nav-link" id="settings-tab" data-bs-toggle="tab" data-bs-target="#settings" type="button" role="tab" aria-controls="settings" aria-selected="false">Settings</button>
</li>
</ul>

<div class="tab-content">
<div class="tab-pane active" id="home" role="tabpanel" aria-labelledby="home-tab">...</div>
<div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="profile-tab">...</div>
<div class="tab-pane" id="messages" role="tabpanel" aria-labelledby="messages-tab">...</div>
<div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">...</div>
</div>

<script>
var firstTabEl = document.querySelector('#myTab li:last-child a')
var firstTab = new bootstrap.Tab(firstTabEl)

firstTab.show()
</script>

顯示

選擇給定的分頁標簽并顯示其關聯的分頁內容。之前選擇的任何其他分頁標簽將被取消,并且其關聯的內容被隱藏。在Tab內容實際顯示之前返回到調用者(即在shown.bs.tab事件發生之前)。

  var someTabTriggerEl = document.querySelector('#someTabTrigger')
var tab = new bootstrap.Tab(someTabTriggerEl)

tab.show()

銷毀

銷毀一個元素的分頁標簽。

獲取實例

Static方法,該方法使您可以獲取與DOM元素關聯的選項實例

var triggerEl = document.querySelector('#trigger')
var tab = bootstrap.Tab.getInstance(triggerEl) // Returns a Bootstrap tab instance

事件

顯示新標簽時,事件將按以下順序觸發:

  1. hide.bs.tab(當前活動的分頁標簽上)
  2. show.bs.tab (待顯示的分頁標簽上)
  3. hidden.bs.tab (在上一個啟動的分頁標簽上,與hide.bs.tab事件相同)
  4. shown.bs.tab(在剛剛顯示的新分頁標簽上,與show.bs.tab事件相同)

如果沒有分頁標簽已經被啟動,那么hide.bs.tab和hidden.bs.tab事件不會被觸發。

Event type Description
show.bs.tab 這個事件因頁簽顯示而觸發,但是會在新頁簽被顯示之前結束。使用event.target和event.relatedTarget將目前與先前啟用的頁簽(如果可用)的作為目標。
shown.bs.tab 這個事件在頁簽顯示后觸發。使用event.target和event.relatedTarget來分別定位啟用中和剛剛啟用的頁簽。
hide.bs.tab 新的頁簽要顯示(先前的啟用頁簽將被隱藏)時,此事將觸發。使用event.target和event.relatedTarget分別定位先前啟用和即將啟用的頁簽。
hidden.bs.tab 新的選項顯示后(因此先前啟用的選項將隱藏),此事件將觸發。使用event.target和event.relatedTarget分別定位先前啟用的頁簽和新啟用的頁簽。
var tabEl = document.querySelector('button[data-bs-toggle="tab"]')
tabEl.addEventListener('shown.bs.tab', function (event) {
event.target // newly activated tab
  event.relatedTarget // previous active tab
})
返回頂部
亚洲一区二区三区在线播放,伊人久久精品无码av一区,亚洲国产精品一区二区第一页免,无码aⅴ精品一区二区三区浪潮
<span id="fu32q"></span>
    1. <li id="fu32q"><meter id="fu32q"><th id="fu32q"></th></meter></li>
      国产一区二区精品久久99| 日韩黄色免费电影| 成人黄色在线看| 95精品视频在线| 蜜臀av一区二区| 成人性生交大片免费看中文网站| 99国产一区二区三精品乱码| 韩日精品视频一区| www.爱久久.com| 久久99久久精品| youjizz久久| 紧缚捆绑精品一区二区| 国产剧情av麻豆香蕉精品| 成人av在线资源网| 国产在线视频不卡二| 91免费视频大全| 国产高清精品网站| 久久国产精品99久久久久久老狼| 99视频一区二区| 国产一区二区毛片| 久久99最新地址| 日韩综合小视频| 97aⅴ精品视频一二三区| 美女网站视频久久| 日韩电影在线观看网站| www.亚洲人| 国产黄色精品网站| 免费在线看成人av| 91小视频在线| 99视频在线观看一区三区| 国产99一区视频免费 | 大桥未久av一区二区三区中文| 蜜桃视频第一区免费观看| 99视频有精品| aaa欧美日韩| 国产高清一区日本| 国产麻豆精品在线观看| 激情久久五月天| 久久国内精品视频| 免费看精品久久片| 蜜桃在线一区二区三区| 免费看黄色91| 另类的小说在线视频另类成人小视频在线| 天堂va蜜桃一区二区三区 | 精品一区在线看| 麻豆精品久久精品色综合| 日韩和的一区二区| 日本在线不卡视频| 日韩精品午夜视频| 日本在线观看不卡视频| 美腿丝袜亚洲色图| 国产一区二区在线影院| 国产在线播放一区三区四| 精品影院一区二区久久久| 精品写真视频在线观看| 国产一区二区三区观看| 国产精品香蕉一区二区三区| 国产91高潮流白浆在线麻豆| 成人av免费在线| 丝袜诱惑亚洲看片| 老色鬼精品视频在线观看播放| 免费观看成人av| 国内精品伊人久久久久av影院 | 成人h动漫精品一区二| 99精品欧美一区二区三区小说 | 国产一区二区三区美女| 成人免费高清在线| 天堂久久久久va久久久久| 六月婷婷色综合| 国产精品一区二区不卡| 99久久国产综合精品麻豆| 日韩不卡免费视频| 国精产品一区一区三区mba视频| 国产精品18久久久| 日韩精品一二三四| 精品一区二区综合| 成人激情免费网站| 精品一区二区三区香蕉蜜桃| 国产成人激情av| 日韩国产在线观看一区| 国产精品99久久久| 日韩黄色免费电影| 国产成人免费高清| 日本中文一区二区三区| 国产成人精品www牛牛影视| 91麻豆国产福利在线观看| 久久国产视频网| 波多野结衣中文一区| 久久99蜜桃精品| a级高清视频欧美日韩| 看电视剧不卡顿的网站| 成人天堂资源www在线| 免费精品视频最新在线| aa级大片欧美| 国产精品2024| 精东粉嫩av免费一区二区三区| 99久久婷婷国产| 国产精品一区不卡| 美女任你摸久久| www.视频一区| 国产福利不卡视频| 精品一区二区三区影院在线午夜| 99精品视频一区二区| 国产精品18久久久久久久久久久久 | 经典一区二区三区| 日本不卡一区二区三区| 成人亚洲一区二区一| 国产在线国偷精品产拍免费yy| 日韩av不卡在线观看| 99精品欧美一区二区三区小说| 国产成人一级电影| 国产毛片精品一区| 狠狠色丁香久久婷婷综合丁香| 视频一区视频二区中文字幕| 成人福利视频在线看| 丰满亚洲少妇av| 国产精品一区免费在线观看| 极品美女销魂一区二区三区免费| 日本伊人精品一区二区三区观看方式 | 99麻豆久久久国产精品免费 | 丝袜诱惑制服诱惑色一区在线观看| 粉嫩av亚洲一区二区图片| 国产乱一区二区| 国产一区二区三区视频在线播放| 久久机这里只有精品| 理论片日本一区| 久久精品国内一区二区三区| 麻豆精品新av中文字幕| 美腿丝袜一区二区三区| 美女视频第一区二区三区免费观看网站 | 粉嫩av亚洲一区二区图片| 国产高清久久久久| 粉嫩嫩av羞羞动漫久久久| 成人在线视频一区二区| 国产成人av自拍| 成人午夜激情片| gogo大胆日本视频一区| 91在线视频18| 日韩精品电影在线观看| 六月婷婷色综合| 韩国av一区二区三区| 国产精品亚洲第一区在线暖暖韩国 | 奇米综合一区二区三区精品视频| 免费在线成人网| 久久精品国产成人一区二区三区| 激情综合亚洲精品| 国产成人鲁色资源国产91色综| 国产成人午夜视频| av成人老司机| 人人精品人人爱| 国产麻豆视频一区二区| 成人国产一区二区三区精品| 日韩成人av影视| 国产精品亚洲一区二区三区妖精| 白白色 亚洲乱淫| 蜜臀久久99精品久久久画质超高清| 久久99日本精品| 成人综合激情网| 免费在线看成人av| 国产河南妇女毛片精品久久久| 成人午夜免费视频| 日本不卡的三区四区五区| 国产在线一区观看| 成人av资源在线观看| 麻豆视频观看网址久久| 高清国产午夜精品久久久久久| 99精品视频在线观看| 激情图区综合网| 99视频精品在线| 精品一区二区免费| 99精品欧美一区| 久久av中文字幕片| proumb性欧美在线观看| 精品一区二区三区影院在线午夜| av电影天堂一区二区在线 | 国内精品伊人久久久久av影院| 成人av综合在线| 国产一区三区三区| 日韩av在线播放中文字幕| 国产成人免费视频| 寂寞少妇一区二区三区| 91丨porny丨蝌蚪视频| 国产一区 二区 三区一级| 日韩精品一二区| 成人avav在线| 国产精品一卡二| 久久精品国产一区二区三| 99久久精品免费精品国产| 国产乱码精品一区二区三| 日本aⅴ精品一区二区三区| 成人高清av在线| 国产成人一区在线| 国产一区在线精品| 精品在线观看免费| 蜜桃传媒麻豆第一区在线观看| av欧美精品.com| 成人av在线资源网| 成人黄色av网站在线| 国产曰批免费观看久久久| 日日摸夜夜添夜夜添精品视频| 国产成人午夜片在线观看高清观看| 麻豆国产欧美一区二区三区| 99免费精品在线| av电影一区二区| 99精品久久久久久| 91麻豆国产在线观看| 91蜜桃婷婷狠狠久久综合9色| 成人av综合在线| www.亚洲免费av| 99精品欧美一区二区三区小说 | 国产99久久久国产精品潘金| 91亚洲精品乱码久久久久久蜜桃| 波多野结衣中文一区| 成人avav影音| 99国内精品久久| 91免费在线播放| 国产91高潮流白浆在线麻豆| 国产一区二区三区在线观看免费| 精品中文av资源站在线观看| 久久国产精品色婷婷| 国产一区二区三区在线观看免费| 国产精品1区二区.| 国产精品一区三区| 成人av中文字幕| 日韩精品欧美精品| 精品一区二区三区日韩| 国产精品18久久久久| aaa欧美日韩| 青青草国产精品亚洲专区无| 麻豆久久久久久| 国产福利精品一区二区| 国产成人亚洲综合a∨婷婷| 成人av免费在线观看| 91亚洲国产成人精品一区二区三 | 日本不卡不码高清免费观看| 美女视频黄免费的久久| 国产一区二区免费看| 国产精品亚洲一区二区三区在线| 风流少妇一区二区| 99久久99久久综合| 毛片基地黄久久久久久天堂| 另类中文字幕网| 国产高清精品网站| 成人黄色国产精品网站大全在线免费观看| 91麻豆6部合集magnet| 免费在线观看精品| 国产东北露脸精品视频| 91网站在线播放| 国精产品一区一区三区mba桃花| 国产麻豆精品在线观看| 91在线观看地址| 国产一区二区影院| 91蝌蚪porny| 国产一区二区在线看| 97久久精品人人澡人人爽| 国产精品亚洲视频| 青青草国产精品亚洲专区无| 国产精品一区二区在线看| 97久久精品人人做人人爽| 国产一区二区三区黄视频| 视频一区二区三区在线| 国产精品 欧美精品| 天使萌一区二区三区免费观看| 久国产精品韩国三级视频| 成人午夜短视频| 久久精品国产亚洲高清剧情介绍| 国产成人av一区二区三区在线| 日本美女一区二区三区| 成人在线视频首页| 国内成人精品2018免费看| 日韩精品1区2区3区| 不卡在线视频中文字幕| 国产一区二区三区免费看 | 日本成人在线不卡视频| 成人福利电影精品一区二区在线观看| 久草这里只有精品视频| 天堂av在线一区| 成人av资源在线观看| 国产精品18久久久久久久网站| 免费的成人av| 日韩一区精品视频| 99久久久精品| 成人免费看黄yyy456| 国产福利一区二区三区| 国内精品伊人久久久久av一坑 | 美国毛片一区二区| 丝袜美腿亚洲色图| 99国产精品久久| a美女胸又www黄视频久久| 成人动漫中文字幕| 成人手机电影网| 成人午夜免费av| 成人午夜精品在线| 成人视屏免费看| 成人av网站免费观看| av不卡免费在线观看| 99re热这里只有精品免费视频| 成人手机电影网| 成人av在线资源| 91在线精品一区二区| 视频一区二区不卡| 青青草97国产精品免费观看| 日本伊人色综合网| 日本伊人午夜精品| 久久国产生活片100| 极品少妇一区二区| 国产毛片精品视频| 国产成人免费视频一区| 成人av网在线| 日韩高清电影一区| 久久精品国产色蜜蜜麻豆| 久久电影网电视剧免费观看| 久久99久久精品| 国产成人高清在线| 91丨porny丨蝌蚪视频| 日本不卡中文字幕| 国产专区综合网| 成人精品国产免费网站| 视频在线观看91| 国产在线日韩欧美| www.成人网.com| 美国三级日本三级久久99| 国产精品自产自拍| www.日韩在线| 久久精品国产免费| 成人免费毛片a| 蜜桃精品在线观看| 国产成人av电影在线| 99久久99久久精品国产片果冻| 热久久免费视频| 国产一区二区看久久| 99精品欧美一区| 精彩视频一区二区| 99国产精品国产精品毛片| 精品一区二区三区久久久| www.视频一区| 国产一区二区影院| 91免费国产视频网站| 国内精品伊人久久久久av影院 | 蜜桃91丨九色丨蝌蚪91桃色| 国产麻豆精品视频| 91免费视频大全| 国产麻豆精品一区二区| 日韩电影在线免费| 粉嫩在线一区二区三区视频| 蜜桃视频在线一区| 99久久精品国产毛片| 国产一区二区导航在线播放| 天堂精品中文字幕在线| 国产大片一区二区| 精品制服美女丁香| 日韩和欧美的一区| av一区二区三区| 国产传媒欧美日韩成人| 久久99国内精品| 奇米精品一区二区三区在线观看一| 国产jizzjizz一区二区| 国内精品国产成人| 麻豆久久久久久| 日韩福利电影在线| av在线这里只有精品| 国产高清在线精品| 国模一区二区三区白浆| 美女国产一区二区| 免费日本视频一区| 日韩高清不卡一区| 91丨国产丨九色丨pron| 成人av网站在线观看免费| 国产91精品在线观看| 国产精品亚洲第一区在线暖暖韩国 | 国产寡妇亲子伦一区二区| 美国三级日本三级久久99| 日韩国产欧美一区二区三区| 9久草视频在线视频精品| 波多野结衣中文一区| 国内不卡的二区三区中文字幕| 91色.com| 91在线精品秘密一区二区| 99久久99久久免费精品蜜臀| 成人精品视频网站| 不卡一区中文字幕| 波多野结衣在线aⅴ中文字幕不卡| 成人午夜看片网址| 成人视屏免费看| 99在线视频精品| 99国产精品国产精品久久| 99久久国产综合精品麻豆| 99re这里都是精品| 日韩综合一区二区| 蜜臀精品久久久久久蜜臀| 美女视频网站久久| 精品在线免费观看| 久久精品999| 国产精品一区二区三区乱码| 国产精品一区专区| 白白色 亚洲乱淫| 91视频免费看| 免费人成精品欧美精品| 极品美女销魂一区二区三区免费| 国产精品一区二区在线观看网站|