我的bootstrap导航栏按钮不起作用

时间:2017-04-23 16:59:46

标签: html css twitter-bootstrap navbar collapse

我的导航栏按钮出现问题,当我的导航栏崩溃时,该按钮应该可以正常工作。我做了很少的研究而且我没有做任何事......

    <nav class="navbar navbar-default navbar-static-top">

        <div id="Titre">
                <span><a id="titre_accueil" href="Accueil.html">Les Centres Canins Athena Inc.</a></span> 
            </div>

        <div class="container">

            <button type="button" class="navbar-toggle" data-toggle="collaspe" data-target=".collapse navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>

            <div class="collapse navbar-collapse" id="ListeDesChoix">
                <ul class="nav navbar-nav">
                    <li class="Item1"><a href="./Accueil.html">Accueil</a></li>
                    <li class="Item1"><a href="./entreprise.html">Garderie</a></li>
                    <li class="Item1"><a href="./Nos%20Produits.html">Boutique</a></li>
                    <li class="Item1"><a href="./Choix%20cours.html">Formations</a></li>
                    <li class="Item1"><a href="./Nos%20Services.html">Services</a></li>
                    <li class="Item1"><a href="./Nous%20Joindre.html">Nous Joindre</a></li>
                    <li class="Item1"><a href="./Homepage.html">English</a></li>
                </ul>
            </div>

        </div>
    </nav>

1 个答案:

答案 0 :(得分:1)

您的代码中有拼写错误:

data-toggle="collaspe"

假设正确加载了jQuery和Bootstrap,纠正这个问题应解决问题:

data-toggle="collapse"