Bootstrap在手机上隐藏了一些歌词

时间:2015-10-20 13:42:31

标签: css twitter-bootstrap repository-design

我希望在桌面上只显示移动设备上的所有cols(5)3。可以使用标准的bootstrap类吗?

 <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/pigu_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/gelezinis_final1-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
    </div>

1 个答案:

答案 0 :(得分:1)

是的,你可以通过hidden-xs类来做: 请检查codepen: codepen.io/anon/pen/JYMNvj

  <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/pigu_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/gelezinis_final1-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 hidden-sm hidden-xs col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
       <div class=" col-lg-2 col-md-2 hidden-sm hidden-xs col-centered " style="text-align: center; margin-right: 10px; overflow: hidden">
          <a href="">
          <img src="http://192.168.0.185/image/cache/data/teo_final-100x100.png" alt="">
          </a>
       </div>
    </div>

它将隐藏小型移动设备上的最后两列 如果你想让它在小型设备上可见,你可以删除hidden-sm