Bootstrap 3 Navbar Collapse

后端 未结 12 2271
长发绾君心
长发绾君心 2020-11-22 09:27

Is there any way to increase the point at which the bootstrap 3 navbar collapses (i.e. so that it collapses into a drop down on portrait tablets)?

These two were app

12条回答
  •  星月不相逢
    2020-11-22 10:24

    And for those who want to collapse at a width less than the standard 768px (expand at a width less than 768px), this is the css needed:

    @media (min-width: 600px) {
    .navbar-header {
            float: left;
    }
    .navbar-toggle {
        display: none;
    }
    .navbar-collapse {
        border-top: 0 none;
        box-shadow: none;
        width: auto;
    }
    .navbar-collapse.collapse {
        display: block !important;
        height: auto !important;
        padding-bottom: 0;
        overflow: visible !important;
    }
    .navbar-nav {
        float: left !important;
        margin: 0;
    }
    .navbar-nav>li {
        float: left;
    }
    .navbar-nav>li>a {
        padding-top: 15px;
        padding-bottom: 15px;
    }
    }
    

提交回复
热议问题