我有推文列表,字体很棒ico。如何在屏幕截图附近的图标附近放置文字?
如果我使用下面的html,我的图标下面有文字。
<ul class="tweets-list text-left">
<li>
<div class="icon">
<i class="fa fa-twitter" aria-hidden="true"></i>
</div>
<div class="text">
<p>Check Out Dtbaker's @Arduino Sales Notification #System
http://t.co/ WBFKIWHJ</p>
<span>3 days ago</span>
</div>
</li>
</ul>
答案 0 :(得分:0)
Belial这是满足您要求的最简单方式,因此您的图标将与文本水平对齐,如果不需要,您可以删除ul和li。让我知道如果不想使用表,我会找到另一种解决方案。
<table>
<tr>
<ul class="tweets-list text-left">
<li>
<td>
<div class="icon">
<i class="fa fa-twitter" aria-hidden="true"></i>
</div>
</td>
<td>
<div class="text">
<p>Check Out Dtbaker's @Arduino Sales Notification #System
http://t.co/ WBFKIWHJ</p>
<span>3 days ago</span>
</div>
</td>
</li>
</ul>
</tr>
</table>
编辑12/31
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css">
<div class="container">
<div class="row justify-content-md-center">
<div class="col">
<div class="icon">
<img width="50" src="http://icons.iconarchive.com/icons/uiconstock/socialmedia/512/Twitter-icon.png"/>
</div>
</div>
<div class="col-md-auto">
<div class="text">
<p>Check Out Dtbaker's @Arduino Sales Notification #System
http://t.co/ WBFKIWHJ</p>
<span>3 days ago</span>
</div>
</div>
</div>
</div>
&#13;
jsfiddle :: https://jsfiddle.net/ufy6t9kd/