在php中水平显示图像或每行4个图像

时间:2018-02-01 14:41:42

标签: php html css



<?php 
                                    $query1=mysqli_query($db_con,"select * from image_tb");
                                    while($row=mysqli_fetch_array($query1)){
                                 ?>
                            </div>
                            <div class="block-content collapse in">
                                <div class="row-fluid padd-bottom">
                                  <div class="span3">
                                      <a href="#" class="thumbnail">
                                        <img src="<?php echo $row['img_location'];?> "  alt="260x180" style="width: 260px; height: 180px;">
                                      </a>
                                  </div>
                                  
                                  
                                  <?php
                                        }
                                    ?>
&#13;
&#13;
&#13;

1 [我需要水平显示图像但是所有图像都垂直显示。]

here's the image vertically displayed

it should be display like this

1 个答案:

答案 0 :(得分:0)

我认为你的问题不是代码,而是风格,对吗?

CSS上的

img {
  float: left;
}
相关问题