1

我有一个由 bootstrap 3 构建的 'index.html' 和 'country.html'

'country.html' 像这样:

<div class="tab-pane fade in" id="argentina"> ... </div> 
<div class="tab-pane fade" id="france"> ... </div>

和 'index.html' 像这样:

<h2>Let's Go to Argentina<h2/>

<h2>Let's Go to France<h2/>

如何从 'index.html'转到#france或选项卡?#argentina

<a href ="country.html#france"></a>不起作用:/

感谢您的帮助

4

1 回答 1

1

像这样使用它

<div class="tab-content">
    <div class="tab-pane fade in active" id="argentina">
       ARGENTINA
    </div>

    <div class="tab-pane fade" id="france">
       FRANCE
    </div>

</div>

<a href="#argentina" data-toggle="tab">Argentina</a>
<a href="#france" data-toggle="tab">France</a>

工作小提琴 http://jsfiddle.net/52VtD/8902/

于 2014-11-07T09:44:52.853 回答