Bootstrap 3: pull-right for col-lg only

前端 未结 13 2181
醉酒成梦
醉酒成梦 2020-11-29 20:00

New to bootstrap 3.... In my layout I have:

elements 1
13条回答
  •  生来不讨喜
    2020-11-29 20:29

    Adding the CSS shown below to your Bootstrap 3 application enables support for

    pull-{ε|sm-|md-|lg-}left
    pull-{ε|sm-|md-|lg-}right
    

    classes that work exactly like the new

    float-{ε|sm-|md-|lg-|xl-}left
    float-{ε|sm-|md-|lg-|xl-}right
    

    classes that have been introduced in Bootstrap 4:

    @media (min-width: 768px) {
        .pull-sm-left {
            float: left !important;
        }
        .pull-sm-right {
            float: right !important;
        }
        .pull-sm-none {
            float: none !important;
        }
    }
    @media (min-width: 992px) {
        .pull-md-left {
            float: left !important;
        }
        .pull-md-right {
            float: right !important;
        }
        .pull-md-none {
            float: none !important;
        }
    }
    @media (min-width: 1200px) {
        .pull-lg-left {
            float: left !important;
        }
        .pull-lg-right {
            float: right !important;
        }
        .pull-lg-none {
            float: none !important;
        }
    }
    .pull-none {
        float: none !important;
    }
    

    Apart from that, it adds

    pull-{ε|sm-|md-|lg-}none
    

    for completeness, being compatible with

    float-{ε|sm-|md-|lg-|xl-}none
    

    from Bootstrap 4.

提交回复
热议问题