当前位置: 移动技术网 > IT编程>开发语言>JavaScript > bootstrap响应式工具使用详解

bootstrap响应式工具使用详解

2017年12月08日  | 移动技术网IT编程  | 我要评论

本文实例为大家分享了bootstrap响应式工具的具体代码,供大家参考,具体内容如下

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>响应式工具</title>
  <link rel="stylesheet" type="text/css" href="../css/bootstrap.css" rel="external nofollow" >
  <script src="../js/jquery-3.2.1.min.js"></script>
  <script src="../js/bootstrap.js"></script>

  <style type="text/css">
    .tips1{width: 30px;height: 300px;background: black}
    .tips2{width: 30px;height: 200px;background: #ddd}
  </style>

</head>
<body style="height: 800px;">

  <!-- <div class="container">
    <div class="row">
       只有在lg分辨率以上的才会显示,否则是不会显示的 
      <div class="col-lg-6 visible-lg-inline-block">col-lg-6</div>
      <div class="hidden-sm hidden-xs">aaaaaaa</div>
    </div>
  </div>
 -->

  <div class="container-fluid">
    <div class="row"><!-- 消除最右边的空隙 -->
      <div class="tips1 pull-right visible-lg-block"></div>
      <!-- pull-right:右浮动 pull-left:左浮动-->
      <div class="tips2 hidden-lg affix"></div><!-- affix固定定位 -->
    </div>
  </div>


</body>
</html>
<!-- 
响应式工具:针对不同的设备展示或隐藏页面的内容
可见类:
  visible-[lg/md/sm/xs]-[inline/block/inline-block]
隐藏类:
  hidden-[lg/md/sm/xs]
浮动:[pull/push]-[right/left]
固定定位:affix
打印类:
  visible-print-[block/inline]:只有在使用打印功能的时候才会显示
  hidden-print:本来是显示内容的,当使用打印功能的时候会隐藏内容
 -->

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持移动技术网。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网