如何将图片连续放入引导程序

时间:2017-03-31 05:44:03

标签: html image

我正在尝试连续拍摄这3张照片,中间没有或只有很小的空格,但这段代码导致它们叠加在一起。我还希望它们与页面中心对齐。

<div class="container">
  <div class="row col-xs-2">
  <img style= "width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt">
</div>  
<div class="row col-xs-2">
  <img style= "width: 25%; height: 25%"  src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog">
</div>
<div class="row col-xs-2">
  <img style= "width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically">  
</div>  
</div>

4 个答案:

答案 0 :(得分:1)

<div class="row">

<div class="col-lg-4 col-md-4 col-xs-4 thumb">
    <a class="thumbnail" href="#">
        <img class="img-responsive" src="http://placehold.it/400x300" alt="">
    </a>
</div>
<div class="col-lg-4 col-md-4 col-xs-4 thumb">
    <a class="thumbnail" href="#">
        <img class="img-responsive" src="http://placehold.it/400x300" alt="">
    </a>
</div>
<div class="col-lg-4 col-md-4 col-xs-4 thumb">
    <a class="thumbnail" href="#">
        <img class="img-responsive" src="http://placehold.it/400x300" alt="">
    </a>
</div>

答案 1 :(得分:0)

你的代码应该是这样的..

不要在每个col上放置类行。

<div class="container">
  <div class="row">
    <div class="col-xs-2">
  <img style="width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt">
</div>  
<div class="col-xs-2">
  <img style="width: 25%; height: 25%" src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog">
</div>
<div class="col-xs-2">
  <img style="width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically">  
</div> 
  </div>
</div>

sample code

答案 2 :(得分:0)

    **YOu need to put everthing in row then add one div with a class .center make the div center finally offset the the first column**  
    ==============================================================


<style>
    /*CENTER COLUMN */
    .align-center {
        text-align: center;
    }
    /*CENTER DIV*/
    .center {
        margin: 0 auto;
        width: 80%;
    }
</style>
<div class="container">
    <div class="row">
        <div class="center">
            <div class="col-xs-2 align-center col-xs-offset-3"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/ckA7ka/mr_marbles.png" alt="Mister Marbles head tilt"> </div>
            <div class="col-xs-2 align-center"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/bTMKyv/kermit.png" alt="Kermit the Dog"> </div>
            <div class="col-xs-2 align-center"> <img style="width: 25%; height: 25%" src="https://image.ibb.co/ki8tQa/peach.png" alt="Peach posing magestically"> </div>
        </div>
    </div>
</div>

答案 3 :(得分:0)

    

<img style= "width: 25%; height: 25%"  src="webfina/2.png" alt="Kermit the Dog">

<img style= "width: 25%; height: 25%" src="webfina/3.png" alt="Peach posing magestically">