Bootstrap, pull-left for small devices

前端 未结 7 752
名媛妹妹
名媛妹妹 2020-12-05 00:31

I\'m building a site in Bootstrap 3. Is there anyway to make a element use the class pull-left on smaller devices and use pull-right on larger ones?

Something like:

7条回答
  •  暖寄归人
    2020-12-05 01:00

    This is what i am using . change @screen-xs-max for other sizes

    /* Pull left in mobile resolutions */
    @media (max-width: @screen-xs-max) {
        .pull-xs-right {
            float: right !important;
        }
        .pull-xs-left {
            float: left !important;
        }
    
        .radio-inline.pull-xs-left  + .radio-inline.pull-xs-left ,
        .checkbox-inline.pull-xs-left  + .checkbox-inline.pull-xs-left  {
            margin-left: 0;
        }
        .radio-inline.pull-xs-left, .checkbox-inline.pull-xs-left{
            margin-right: 10px;
        }
    }
    

提交回复
热议问题