我的切换按钮导航栏没有响应

时间:2017-12-15 04:39:19

标签: javascript jquery html css twitter-bootstrap

当我点击小尺寸切换按钮时,它既不起作用也不响应。这可能是什么问题?我尝试了一些解决方案但失败了。

$direct

1 个答案:

答案 0 :(得分:1)

this所示,您需要加载一些额外的脚本files才能使引导程序正常工作。

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>

<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" type="text/css">
</head>
<body style="background-color:darkslategrey">
<!--navbar-->
<nav class="navbar navbar-toggleable navbar-light bg-faded">
    <!--intro navbar-->
    <button type="button" class="navbar-toggler navbar-toggler-icon navbar-toggler-right collapsed" data-toggle="collapse" data-target="#menu"><!--responsive collapse menu--></button>
    <span class="navbar-brand-icon">Bootstrap</span>
    <!--navbar logo-->

    <div class="collapse navbar-collapse" id="menu">
        <!--in the item-->
        <ul class="nav navbar-nav">
            <li class="nav-item active"><a href="" class="nav-link">Home</a></li>
            <li class="nav-item"><a href="" class="nav-link">About us</a></li>
            <li class="nav-item"><a href="" class="nav-link">Services</a></li>
        </ul>
    </div>

</nav>
<!--header-->
<div class="container">
    <div clsss="header-page">
        <div class="lead">
            <h1>Welcome in Helper Classes</h1>
        </div>
        <hr>  
</body>
</html>