你可以在标记上使用绝对位置,这样它就不会影响文本。
参见代码段
.text {
padding-left: 35px;
padding-top:5px;
position: relative
}
.text:before {
font-family: FontAwesome;
content: '\f00c';
font-size: 20px;
color: red;
position: absolute;
top: 0px;
left: 0px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="text-container">
<div class="col-sm-4 col-xs-6">
<p class="text">Small amount of text</p>
</div>
</div>
<div class="text-container">
<div class="col-sm-4 col-xs-6">
<p class="text">Large amount of text and more text lorem This should start under the "Large", and have a left margin, so the space under the checkmark is empty</p>
</div>
</div>