面板标题中的Bootstrap glyhicon对齐

时间:2014-03-11 12:17:03

标签: twitter-bootstrap

我试图在面板标题上设置一些字形,但不能左右对齐。 试图用span或p包围,但仍然没有工作...... 缺少什么?

<div class="panel-heading">
    <h3 class="panel-title">
        <a class="text-left" href='#' style="margin-right: 10px;"><span class="glyphicon glyphicon-refresh"></span></a>
        Page Title
        <a class="text-right" href='#'><span class="glyphicon glyphicon-remove-sign"></span></a>
    </h3>
</div>

1 个答案:

答案 0 :(得分:2)

添加课程pull-rightpull-left而不是text-righttext-left来锚定包含该字形的标签。

<h3 class="panel-title">
    <a class="pull-left" href='#' style="margin-right: 10px;"><span class="glyphicon glyphicon-refresh"></span></a>
    Page Title
    <a class="pull-right" href='#'><span class="glyphicon glyphicon-remove-sign"></span></a>
</h3>