Twitter的引导不工作 [英] Twitter bootstrap is not working

查看:137
本文介绍了Twitter的引导不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我的问题是,按钮不起作用,我找不到在哪里,我错了。任何帮助吗?此外,我在Twitter的引导是新<按钮式=按钮移到级=Navbar的切换数据切换=崩溃数据目标=&GT导航栏崩溃。

 < D​​IV CLASS =导航栏导航栏默认导航栏固定顶>
    < D​​IV CLASS =容器>
        < D​​IV CLASS =导航栏头>
            <按钮式=按钮移到级=Navbar的切换数据切换=崩溃数据目标=&GTNavbar的崩溃。
                <跨度类=图标栏>< / SPAN>
                <跨度类=图标栏>< / SPAN>
                <跨度类=图标栏>< / SPAN>
            < /按钮>
            < A HREF =#类=Navbar的品牌> Mitashki< / A>
        < / DIV>        < D​​IV CLASS =Navbar的垮垮>
            < UL类=NAV导航栏,导航>
                <立GT;< A HREF =#>家庭和LT; / A>< /李>
                <立GT;< A HREF =#>关于< / A>< /李>
            < / UL>
        < / DIV>
    < / DIV>
< / DIV>


解决方案

当您使用引导程序,这是很好的,如果使用基本的模板。

基本的模板

和你的问题:在引导崩溃navbars使用bootstrap.js。而这个文件基于jQuery。因此,在您code的底部,你必须添加这两个文件。

 <脚本SRC =htt​​ps://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js>< / SCRIPT&GT ;
    <脚本SRC =JS / bootstrap.min.js>< / SCRIPT>
< /身体GT;
< / HTML>

Hi my problem is that the button doesn't work, I can't find where I'm wrong. Any help? Also I'm new in Twitter Bootstrap.<button type="buttton" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

<div class="navbar navbar-default navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="buttton" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="#" class="navbar-brand">Mitashki</a>
        </div>

        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li><a href="#">home</a></li>
                <li><a href="#">about</a></li>  
            </ul>
        </div>
    </div>
</div>

解决方案

When you use Bootstrap , it's good if use basic template .

Basic Template

And your problem : collapse navbars in Bootstrap uses bootstrap.js . And this file based on jQuery . So in bottom of your code you must add both files .

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>

这篇关于Twitter的引导不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆