微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – 如何在bootstrap移动版本中隐藏网格中的一列

我认为我想在引导程序移动版本中隐藏网格中的一列是有点棘手的.让我们举个例子
<div class="row">
  <div class="col-xs-9">
    <p class="testimonial-about">"We have managed to received good number of applications through MyJobs in comparison to advertising in the newspaper and would recommend MyJobs to other companies to assist with their recruitment needs"</p>
  </div>
  <div class="col-xs-3 center-image hidden-xs"><img src="myimage.png"/></div>
</div>

以上编码,我在移动设备查看时隐藏图像部分.我想要的是我不想要图像部分的间距,即使它被隐藏为增加左侧部分直到右侧.

解决方法

因为,您将第二列隐藏在“xs”中,您可以通过将类“col-xs-12”定义为column1来使用第一列的全宽.
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
  <div class="col-xs-12 col-sm-9">
    <p class="testimonial-about">"We have managed to received good number of applications through MyJobs in comparison to advertising in the newspaper and would recommend MyJobs to other companies to assist with their recruitment needs"</p>
  </div>
  <div class="col-sm-3 center-image hidden-xs"><img src="myimage.png"/></div>
</div>

原文地址:https://www.jb51.cc/css/215276.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。