Bootstrap没有垂直间隙

时间:2014-04-18 14:48:29

标签: css twitter-bootstrap grid

我有一个经典的引导布局,如:http://uppix.com/f-Now5351398300161b58.png

我希望项目之间没有垂直差距:http://uppix.com/f-Iwant5351394f00161b56.png

感谢您的回答。

    <div class="col-xs-12 col-sm-9">
      <div class="row">
        <div class="col-6 col-sm-6 col-lg-4">
          <div class="item">
            <a href="#" class="price">300 EUR</a>                
            <a href="#"><img class="img-responsive" src="http://wbpreview.com/previews/WB03K48SB/assets/img/h-3.jpg"></a>
            <div class="caption">
              <h3><a href="#">Bulharsko, Primorsko</a></h3>
              <h4><a href="#">Penzión SIM</a> 
                <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star blank-star"></i><i class="fa fa-star blank-star"></i>
              </h4>
              <p class="info"><a href="#">Donec id elit non mi porta gravida at eget metus. Donec id elit non mi porta gravida at eget metus.</a></p>
              <p><i class="fa fa-calendar"></i> 21.06.- 18.06. (8 dní)</p>
              <p><i class="fa fa-cutlery"></i> All inclusive <span class="transport">Bratislava <i class="fa fa-plane"></i></span></p>
            </div>
          </div>
        </div><!--/span-->
        .
        .
        .
      </div>
    </div>

1 个答案:

答案 0 :(得分:-1)

您可以为图像指定一个唯一的类,并给它一个负的上边距,例如

   .MoveImageUp {
  margin-top: -150px;
}