删除引导程序中图像列之间的水平空格

时间:2017-07-21 02:24:03

标签: html css twitter-bootstrap

我在第二排的空间很难,我想把图像缩小到空间,但是东西没有用,我尝试了其他的解决方案,但是他们没有帮助

我该如何解决这个问题?

以下是我想要摆脱的图像,第二行的空格:

enter image description here

res = [word for word in mylist if len(word) == max([len(word) for word in mylist])][-1:]

所以这只是我用于列的代码随时可以查看它   PLS

2 个答案:

答案 0 :(得分:1)

您可以使用解决方案https://jsfiddle.net/ynsmy2ku/

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
  <div class="row">
    <div class="col-lg-9 col-md-12 pull-right"> 
      <div class="row">
        
        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>

        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>

        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>
      
        
        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>
        
        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>
        
        <div class="col-lg-4">
          <div class="thumbnail nothing">
            <img src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg" class="image-responsive">
          </div>
        </div>
        
      </div>
    </div>
</div>
</div>

如果您要删除第二行中的空格,而不是多行,请单行&amp;在里面使用列(col-models)

它会根据空间自动调整。

答案 1 :(得分:0)

最后,我找到了小丑之间空间的解决方案。这是由不同的图像尺寸引起的。在这里,您可以使用解决方案。

<div class="row" style="display: flex; flex-wrap: wrap;">
   <div class="col-lg-4">
      "your images"
   </div>
</div>

只需将样式添加到行中即可。