小编Rac*_*nis的帖子

bootstrap中如何将图片排成一行

我试图将这 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>
Run Code Online (Sandbox Code Playgroud)

html image

4
推荐指数
1
解决办法
3万
查看次数

标签 统计

html ×1

image ×1