无法在bootstrap 3中获得药丸以正常运行

时间:2015-06-17 03:20:07

标签: twitter-bootstrap twitter-bootstrap-3

每当我尝试点击药丸时,页面都停留在第一颗药丸上并拒绝改变。我正在使用最新版本的bootstrap。我能做些什么来解决它吗?

 <div class="container">
  <div class="masthead">
        <div class="container">
            <ul class="nav nav-pills nav-justified">
                <li class="active"><a href="#Home" data-toggle="pill">Home</a></li>
                <li class=""><a href="#About" data-toggle="pill">About</a></li>
                <li class=""><a href="#items" data-toggle="pill">items</a></li>
                <li class=""><a href="#Things" data-toggle="pill">things</a></li>
                <li class=""><a href="#stuff" data-toggle="pill">stuff</a></li>
                <li class=""><a href="#other" data-toggle="pill">other</a></li>
            </ul>
            <div class="tab-content">
                <div id="home" class="tab-pane jumbotron active">
                    <h1>Generic</h1>
                        <p class="lead">Blah.</p>
                        <p><a class="btn btn-lg btn-success" href="#" role="button">blah</a></p>
                </div>
                <div id="About" class="tab-pane">
                    <h3>Section A</h3>
                </div>
                <div id="items" class="tab-pane">
                    <h3>blah</h3>
                </div>
                <div id="Things" class="tab-pane">
                    <h3>blah</h3>
                </div>
                <div id="stuff" class="tab-pane">
                    <h3>blah</h3>
                </div>
                <div id="other" class="tab-pane">
                    <h3>blah</h3>
                </div>
            </div>
        </div>
    </div>
</div>\

1 个答案:

答案 0 :(得分:1)

您的代码you just need to import the bootstrap javascript file.

没有任何问题

将此添加到您的<head>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

这是link to it working perfectly on JsFiddle