我有一个图像和一个文本并排,但现在我需要在每组文本和图像之间添加一些间距。我的代码。
.container {
float: left;
display: block;
margin-top: 5%;
}

<div class="container">
<!--Row with three equal columns-->
<div class="row">
<div class="col-md-4">
<div class="demo-content">
<img src="images/squareicon.png" class="pull-left">
<h3>Versatile Spaces</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div>
</div>
<div class="col-md-4">
<div class="demo-content bg-alt">
<img src="images/pointericon.png" class="pull-left">
<h3>Central Location</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div>
</div>
<div class="col-md-4">
<div class="demo-content">
<img src="images/foodicon.png" class="pull-left">
<h3>Catering to Taste</h3>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</div>
</div>
</div>
</div>
&#13;
答案 0 :(得分:2)
您可以为图片提供保证金:
.demo-content img {
margin-right: 20px;
}