Bootstrap, pull-left for small devices

前端 未结 7 745
名媛妹妹
名媛妹妹 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 00:59

    There is no need to create your own class with media queries. Bootstrap 3 already has float ordering for media breakpoints under Column Ordering.

    The syntax for the class is col-<#grid-size>-(push|pull)-<#cols> where <#grid-size> is xs, sm, md or lg and <#cols> is how far you want the column to move for that grid size. Push or pull is left or right of course.

    I use it all the time so I know it works well.

提交回复
热议问题