我试图根据文件位置创建一个ID为ID的引导标签导航栏。示例:home.html位于sample / default / home.html中。但是,当我在ID中提出斜杠和句点时,标签系统不起作用。当我使用不同的ID时,它可以完美地运行,例如" home"," profile"等。
<div class="card" style="height:100%;">
<div class="card-header">
<ul class="nav nav-tabs card-header-tabs float-xs-left" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#sample/default/home.html" role="tab">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sample/default/profile.html" role="tab">Profile</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sample/default/messages.html" role="tab">Messages</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sample/default/settings.html" role="tab">Settings</a>
</li>
</ul>
</div>
<div class="tab-content card-block">
<div class="tab-pane active" id="sample/default/home.html" role="tabpanel">home</div>
<div class="tab-pane" id="sample/default/profile.html" role="tabpanel">profile</div>
<div class="tab-pane" id="sample/default/messages.html" role="tabpanel">messages</div>
<div class="tab-pane" id="sample/default/settings.html" role="tabpanel">settings</div>
</div>
</div>
答案 0 :(得分:0)
ID和NAME令牌必须以字母([A-Za-z])开头,可能是 后跟任意数量的字母,数字([0-9]),连字符(“ - ”), 下划线(“_”),冒号(“:”)和句点(“。”)。