使用包装在导航选项卡子菜单中的bs4切换导航丸时,我遇到以下问题:
我需要为每个药丸建立一个功能链接,该链接应打开该特定药丸并在页面刷新时保持不变-我认为这被称为深度链接,但是我发现的示例要么不同,要么就是旧的。
<nav>
<div class="nav nav-tabs" id="nav-tab" >
<a class="nav-item nav-link disabled" id="nav-menu1-tab" href="#">menu1</a>
<a class="nav-item nav-link active" id="nav-menu2-tab" href="#nav-menu2">active-tab</a>
<a class="nav-item nav-link disabled" id="nav-menu3-tab" href="#">menu3</a>
</div>
</nav>
<div class="tab-content" id="nav-tabContent">
<div class="tab-pane fade show active" id="nav-menu2"></div>
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="pills-option1-tab" data-toggle="pill" href="#option1" role="tab" aria-controls="pills-option1" aria-selected="true">option1</a>
</li>
<li class="nav-item">
<a class="nav-link" id="pills-option2-tab" data-toggle="pill" href="#option2" role="tab" aria-controls="pills-option2" aria-selected="false">option2</a>
</li>
</ul>
<div class="tab-content" id="pills-tabContent">
<div class="tab-pane fade show active" id="option1" role="tabpanel" aria-labelledby="pills-option1-tab">option1...</div>
<div class="tab-pane fade" id="option2" role="tabpanel" aria-labelledby="pills-option2-tab">option2...</div>
</div>
</div>