我想在导航栏的导航栏菜单项中添加一个简单的图标:
这是代码:
<div class="span4 well">
<ul class="nav nav-list">
<li class="nav-header">Recent news</li>
<li><a href="/news/introducing-new-apps-for-timeline"><i class="icon icon-play"></i> Introducing New Apps for Timeline</a></li>
<li class="divider"></li>
<li><a href="/news/do-you-shake-your-tea"><i class="icon icon-play"></i> Do you shake your tea?</a></li>
<li class="divider"></li>
<li><a href="/news/new-delta-sky-club-opens"><i class="icon icon-play"></i> New Delta Sky Club Opens at LaGuardia’s Terminal C</a></li>
<li class="divider"></li>
<li><a href="/news/love-is-in-the-air"><i class="icon icon-play"></i> Love is in the Air</a></li>
<li class="divider"></li>
</ul>
</div>
如果你检查THIS FIDDLE,当文字超过一行时,你会发现它看起来不太漂亮......我怎样才能对齐文字(两行)?我添加了
答案 0 :(得分:4)
尝试在锚点上使用否定文字缩进。
ul.nav li a {
text-indent: -20px;
padding-left: 35px;
}
在此处查看结果:http://jsfiddle.net/GdaPN/2/