Bootstrap导航栏按钮的高度和宽度

时间:2014-09-08 20:12:59

标签: twitter-bootstrap

嗨我在阅读网站并做一些例子时我很擅长引导程序。我开始使用navbar。当我创建链接时,它在导航栏中显示为按钮,但其高度和宽度显示为奇怪。这是我的片段:

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span> <span
                    class="icon-bar"></span> <span class="icon-bar"></span> <span
                    class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">My Project</a>
        </div>
        <div class="collapse navbar-collapse"
            id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">Portal</a></li>
                <li><a href="#">Forum</a></li>
                <li><a href="#">Members</a></li>
                <li class="dropdown"><a href="#" class="dropdown-toggle"
                    data-toggle="dropdown">Dropdown <span class="caret"></span></a>
                    <ul class="dropdown-menu" role="menu">
                        <li class="active"><a href="#">Portal</a></li>
                        <li><a href="#about">Forum</a></li>
                        <li><a href="#contact">Members</a></li>
                    </ul></li>
            </ul>
            <form class="navbar-form navbar-left" role="search">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="#" class="btn btn-default" role="button">Login</a></li>
                <!-- here is the problem -->
                <li><a href="#" class="btn btn-primary" role="button">Register</a></li>
                <!-- here is the problem -->
            </ul>
        </div>
    </div>
</nav>

请告诉我如何解决它。感谢。

Screenshot http://s10.postimg.org/n8ozhzd9j/bootstrap_button.png

0 个答案:

没有答案