当列以移动模式堆叠时,我想要一些垂直空间分隔列内容,我该怎么做?
在http://jsfiddle.net/tofutim/3sWEN/中看到jsfiddle并改变输出的宽度。在第二个叶尖之前应该有一些间距。
<div class="container"> <div class="well well-lg" style="margin:10px"> <div class="row"> <div class="col-sm-6"> <p>"Lorem ipsum dolor sit amet,consectetur adipisicing elit,sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."</p> <form> <input type="textBox" class="form-control" placeholder="Username"></input> <input type="password" class="form-control" placeholder="Password"></input> </form> </div> <div class="col-sm-6"> <p>"Lorem ipsum dolor sit amet,sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."</p> <form role="form"> <div class="form-group"> <button class="form-control btn btn-default">Push me</button> <input type="textBox" class="form-control" placeholder="Username"></input> <input type="password" class="form-control" placeholder="Password"></input> </div> </form> </div> </div> </div> </div>
解决方法
@H_403_9@ 一种方法是使用CSS,在较小的设备/宽度上将margin-bottom添加到col- *。@media (max-width: 768px) { [class*="col-"]{ margin-bottom: 15px; } }
<div class="col-sm-6"> <div class="hidden-lg hidden-md hidden-sm"> </div> ...