【发布时间】:2020-05-18 20:36:42
【问题描述】:
我想在 div 中垂直对齐列表项,这是我编写的代码:
<div>
<div class="span4">
<img style="float: left; width: 80px;" src="http://www.zalfaniyamen.com/wp-content/uploads/2020/02/200px-Dhofar_Club.png" />
</div>
<div>
<ul class="list-group" style="margin-bottom: 0 !important;">
<li class="list-group-item active" style="margin-left: 120px !important; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 20px; font-weight: 600; width: 60%;">
Win super cup of sultun
</li>
</ul>
</div>
</div>
<div>
<div style="clear: both;"></div>
</div>
【问题讨论】:
-
您能详细说明一下吗?你如何在 div 中垂直对齐列表项,因为默认情况下列表项是垂直对齐的。
标签: html css twitter-bootstrap vertical-alignment