Bootstrap, pull-left for small devices

前端 未结 7 742
名媛妹妹
名媛妹妹 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:05

    You can use CSS Media Queries

    basic usage will be like this; if you want to float left below devices of width 500px, then

    @media (max-width: 500px) {
     .your_class {
        float: left;
      }
    }
    
     @media (min-width: 501px) {
     .your_class {
        float: right;
      }
    }
    
    0 讨论(0)
提交回复
热议问题