欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

bootstrap navbar 768 折叠

shiping1 的头像
 

I want to collapse my navbar in earlier resolution than 768px, for example 992px, how would I do that? thanks! (I know I can customize it on the bootstrap page, but I don't want to start my project over again with new bootstrap.css file)

shareimprove this question
 

正确答案 

@media (min-width: 768px) and (max-width: 991px) {
    .navbar-collapse.collapse {
        display: none !important;
    }
    .navbar-collapse.collapse.in {
        display: block !important;
    }
    .navbar-header .collapse, .navbar-toggle {
        display:block !important;
    }
    .navbar-header {
        float:none;
    }
}

Add this



来自 http://stackoverflow.com/questions/21076922/bootstrap-how-to-collapse-navbar-earlier


普通分类: