Disable ONE of the Twitter Bootstrap responsive layouts

前端 未结 4 2171
后悔当初
后悔当初 2020-12-14 03:32

I would like to disable one of the Responsive layouts. Whatever the second smallest layout is before it switches to the mobile view.

4条回答
  •  轮回少年
    2020-12-14 04:19

    • call your css after the bootstrap call.
    • In your css copy the row, span css form the layout you want and place it in your css.
    • change the media query to something like this (The max width is the width you like to stick to):
    @media (max-width: 1200px) {
        .row {
            margin-left: -30px;
            *zoom: 1;
        }
        .row:before,
        .row:after {
            display: table;
            content: "";
            line-height: 0;
        }
        .row:after {
            clear: both;
        }
        [class*="span"] {
            float: left;
            margin-left: 30px;
        }
        .container,
        .navbar-static-top .container,
        .navbar-fixed-top .container,
        .navbar-fixed-bottom .container {
            width: 1170px;
        }
        .span12 {
            width: 1170px;
        }
        .span11 {
            width: 1070px;
        }
        .span10 {
            width: 970px;
        }
        .span9 {
            width: 870px;
        }
        .span8 {
            width: 770px;
        }
        .span7 {
            width: 670px;
        }
        .span6 {
            width: 570px;
        }
        .span5 {
            width: 470px;
        }
        .span4 {
            width: 370px;
        }
        .span3 {
            width: 270px;
        }
        .span2 {
            width: 170px;
        }
        .span1 {
            width: 70px;
        }
        .offset12 {
            margin-left: 1230px;
        }
        .offset11 {
            margin-left: 1130px;
        }
        .offset10 {
            margin-left: 1030px;
        }
        .offset9 {
            margin-left: 930px;
        }
        .offset8 {
            margin-left: 830px;
        }
        .offset7 {
            margin-left: 730px;
        }
        .offset6 {
            margin-left: 630px;
        }
        .offset5 {
            margin-left: 530px;
        }
        .offset4 {
            margin-left: 430px;
        }
        .offset3 {
            margin-left: 330px;
        }
        .offset2 {
            margin-left: 230px;
        }
        .offset1 {
            margin-left: 130px;
        }
    }
    

提交回复
热议问题