bootstrap navbar toggle避免第二个滚动条

时间:2016-11-17 15:27:22

标签: html css twitter-bootstrap

有没有办法在bootstrap切换时避免第二个滚动条?

很酷的木头,如果有一个窍门可以避免它:)最好的感谢是增加高度或类似的东西?

enter image description here

我的bootstrap default-nav css代码:

@media (max-width: 1200px) {
    .navbar-header {
        float: none;
    }

    .navbar-left, .navbar-right {
        float: none !important;
    }

    .navbar-right {
        margin-right: 0;
        background-color: #2c3e50;
    }

    .navbar-toggle {
        display: block;
        float:right;
    }

    .navbar-collapse {
        border-top: 1px solid transparent;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
        background-color: #fff;
        text-align: left;
    }

    .navbar-fixed-top {
        top: 0;
        border-width: 0 0 1px;
    }

    .navbar-collapse.collapse {
        display: none !important;
        background-color: #fff;
        text-align: left;
    }

    .navbar-nav {
        float: none !important;
        background-color: #fff;
        text-align: left;
        margin-top: 7.5px;
    }

    .navbar-nav > ul {
        width: 100%;
    }

    .navbar-nav > li {
        float: none;
        height: 45px;
        line-height: 36px;
    }

    .navbar-nav > li > a {
        padding-top: 10px;
        padding-bottom: 10px;
        border-right: none;
        height: 45px;
        line-height: 36px;
    }

    .navbar-nav .open .dropdown-menu {
        display: block;
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: #fff;
        border: 0;
        -webkit-box-shadow: none;
        box-shadow: none;
    }

    .collapse.in {
        display: block !important;
    }
}

<div class="container" id="head">
                    <div id="logo"><a href="?index.php"><img src="include/designs/foekuhei/images/logo.png"
                                                             class="img-responsive" alt="Förderkreis für Kultur und Heimatgeschichte e.V. Gottmadingen" /></a></div>

                    <nav class="navbar navbar-default">
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#trebingnav" aria-expanded="false">
                                <span class="sr-only">Navigation ein-/ausblenden</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                        </div>
                        <div class="collapse navbar-collapse" id="trebingnav">
                            <ul class="nav navbar-nav">
                                <li class="Home"><a href="index.php?foekuhei">Home</a></li>
                                <li class="Experimentelle"><a href="index.php?experimentelle">Experimentelle</a></li>
                                <li class="dropdown Veranstaltungen">
                                    <a href="index.php?news" class="dropdown-toggle" data-toggle="dropdown"
                                       role="button" aria-haspopup="true" aria-expanded="false">Veranstaltungen <span class="caret"></span></a>
                                    <ul class="dropdown-menu Verantstaltungen">
                                        <li><a href="index.php?news">Aktuelles Programm</a></li>
                                        <li><a href="index.php?jahresprogramm">Aktuelles Jahresprogramm</a></li>
                                        <li><a href="index.php?andereveranstaltungen">Andere Veranstaltungen</a></li>
                                        <li><a href="index.php?news-archiv">R&uumlckblick</a></li>
                                        <li><a href="index.php?galleryfoekuhei">Bildergalerien</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown Wir">
                                    <a href="index.php?vorstand" class="dropdown-toggle" data-toggle="dropdown"
                                       role="button" aria-haspopup="true" aria-expanded="false">&Uumlber uns <span class="caret"></span></a>
                                    <ul class="dropdown-menu">
                                        <li><a href="index.php?vorstand">Vorstand</a></li>
                                        <li><a href="index.php?ehrungen">Ehrungen</a></li>
                                        <li><a href="index.php?geschichte">Geschichte</a></li>
                                        <li><a href="index.php?satzung">Satzung</a></li>
                                        <li><a href="index.php?links">Links</a></li>
                                    </ul>
                                </li>
                                <li class="Projekte"><a href="index.php?projekte">Projekte</a></li>
                                <li class="Tickets"><a href="index.php?ticketsoverview">Tickets</a></li>
                                <li class="dropdown Mitglied">
                                    <a href="index.php?mitgliedwerden" class="dropdown-toggle" data-toggle="dropdown"
                                       role="button" aria-haspopup="true" aria-expanded="false">Mitglied werden <span class="caret"></span></a>
                                    <ul class="dropdown-menu Mitglied">
                                        <li><a href="index.php?mitgliedwerden">Warum beitreten?</a></li>
                                        <li><a href="index.php?joinus">Online-Beitritt</a></li>
                                    </ul>
                                </li>
                                <li class="dropdown Kontakt">
                                    <a href="index.php?contact" class="dropdown-toggle" data-toggle="dropdown"
                                       role="button" aria-haspopup="true" aria-expanded="false">Kontakt</a>
                                    <ul class="dropdown-menu">
                                        <li><a href="index.php?contact">Kontakt</a></li>
                                        <li><a href="index.php?anfahrt">Anfahrt</a></li>
                                    </ul>
                                </li>
                                <li class="Impressum" ><a href="index.php?impressum1">Impressum</a></li>
                            </ul>
                        </div>
                    </nav>

                </div><!-- Close HEAD -->

0 个答案:

没有答案