Where to edit bootstrap @grid-float-breakpoint

前端 未结 3 1305
粉色の甜心
粉色の甜心 2020-12-14 15:53

I know that you can change @grid-float-breakpoint in the \"variables.less\" file which compiles into the bootstrap package we all download and use (I think).



        
3条回答
  •  自闭症患者
    2020-12-14 16:45

    Here is a link to a css-only solution to change the grid-float-breakpoint: CSS-Solution

    @media (max-width: 991px) {
        .navbar-header {
            float: none;
        }
        .navbar-toggle {
            display: block;
        }
        .navbar-collapse {
            border-top: 1px solid transparent;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
        }
        .navbar-collapse.collapse {
            display: none!important;
        }
        .navbar-nav {
            float: none!important;
            margin: 7.5px -15px;
        }
        .navbar-nav>li {
            float: none;
        }
        .navbar-nav>li>a {
            padding-top: 10px;
            padding-bottom: 10px;
        }
        .navbar-text {
            float: none;
            margin: 15px 0;
        }
        /* since 3.1.0 */
        .navbar-collapse.collapse.in { 
            display: block!important;
        }
        .collapsing {
            overflow: hidden!important;
        }
    }
    

    Just change 991px by 1199px for md sizes

    Of cause the comment to my posting, I have copy-pasted the css-solution behind my link above. I have overtaken the solution in my app (MVC6 RC) to set another float-breakpoint (only by apply the .css-style).
    Note: im MVC6, you have to add another @ before media (@@media).

提交回复
热议问题