简体   繁体   English

Bootstrap 3导航栏崩溃不扩展

[英]Bootstrap 3 navbar collapse not expanding

I'm making a simple navbar that collapses for mobile viewers. 我正在为移动查看器创建一个折叠的简单导航栏。 The icon appears when the page reaches a small width, but upon clicking the button, it will not expand. 当页面达到较小宽度时,将显示该图标,但是单击该按钮后,它将不会展开。

<div id="headerfront" class="navbar navbar-static-top">
        <div class="container">

            <a href="" class="navbar-brand" ><img id="logo" src="images/brand.png" height="44px" width="146px" /></a>

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navHeaderCollapse">
                <span class="glyphicon glyphicon-chevron-down" ></span>
            </button>

            <div class="collapse navbar-collapse navHeaderCollapse">
                <ul class="nav navbar-nav navbar-right">

                    <li><a href="#" class="" >Sign In</a></li>
                    <li><a href="#" class="" >Sign Up</a></li>

                </ul>
            </div>

        </div>
    </div>

Here are the links and scripts in the head: 这是标题中的链接和脚本:

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="js/boostrap.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css">

Any ideas? 有任何想法吗? Thanks! 谢谢!

More likely you miss bootstrap js file please replace your line 您更有可能错过bootstrap js文件,请替换行

<script src="js/boostrap.js" type="text/javascript"></script>

with

<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM