中修复。
我当前正在使用Bootstrap 4 beta,并且我已经嵌套了选项卡。尝试在它们之间切换时会感到困惑。
我不确定它在Bootstrap 4 Alpha中具有相同的行为,但我认为这是Beta的新行为。
html(jsfiddle):
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs" id="outerTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tabc" aria-controls="tabc" role="tab" aria-expanded="true">Tab-1</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tabb" aria-controls="tabb" role="tab">Tab-2</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#taba" aria-controls="taba" role="tab">Tab-3</a>
</li>
</ul>
</div>
<div class="card-body tab-content">
<div class="tab-pane active" id="tabc" role="tabpanel">
Content for Tab-1 and:
<div class="card">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs" id="innerTab" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#tab1" aria-controls="tab1" role="tab" aria-expanded="true">Nested Tab-1</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tab2" aria-controls="tab2" role="tab">Nested Tab-2</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tab3" aria-controls="tab3" role="tab">Nested Tab-2</a>
</li>
</ul>
</div>
<div class="card-body tab-content">
<div class="tab-pane active" id="tab1" role="tabpanel">
Content for Nested Tab-1
</div>
<div class="tab-pane" id="tab2" role="tabpanel">
Content for Nested Tab-2
</div>
<div class="tab-pane" id="tab3" role="tabpanel">
Content for Nested Tab-3
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tabb" role="tabpanel">
Content for Tab-2
</div>
<div class="tab-pane" id="taba" role="tabpanel">
Content for Tab-3
</div>
</div>
</div>
johann-s对GitHub上的问题做出了响应,因为它将在V4 Beta 2