为 Font Awesome 重写字形代码

Rewriting glyphicon code for Font Awesome

我目前正在使用以下代码通过我的 headers 显示几个字形图标(glyphicon-chevron-down 和 glyphicon-remove-sign):

<h2 class="h2Article collapsed" id="a4" data-toggle="collapse" data-target="#b4" aria-expanded="false"><span class="Article"><span class="label label-primary"><small><span class="only-collapsed glyphicon glyphicon-chevron-down"></span><span class="only-expanded glyphicon glyphicon-remove-sign"></span></small> Acquired LifeTags</span></span></h2>

我刚刚发现了 Font Awesome 的最新库并想尝试一下。我应该如何修改上面的代码以将 glyphicon-chevron-down 替换为这个?

<i class="fa fa-chevron-down fa-2x"></i>

P.S。我应该补充一点,如果可能的话,我想简化我的代码。四个独立的跨度太多了。 ;)

替换

<span class="only-collapsed glyphicon glyphicon-chevron-down"></span>

来自

<i class="only-collapsed fa fa-chevron-down fa-2x"></i>

没有了:P

你应该得到这样的结果:

<h2 class="h2Article collapsed Article label label-primary" id="a4"
     data-toggle="collapse" data-target="#b4" aria-expanded="false">
    <small>
        <i class="only-collapsed fa fa-chevron-down fa-2x"></i>
        <i class="only-expanded glyphicon glyphicon-remove-sign"></i>
    </small>
    &nbsp;Acquired LifeTags
</h2>