标签与Bootstrap CSS中的交叉图标

时间:2014-01-08 05:31:56

标签: html css css3 twitter-bootstrap-3

我使用下面的代码来创建标签

<span class="label label-tags">Country 
    <a onclick="javascript:alert(0);" href="javascript:void(0);"> 
     <i class="fa fa-trash-o"></i>
    </a>
</span>

CSS类:

.label-tags {
    background-color: #CBF6FF;
    color: #000000;
    font-size: 100%;
    font-weight: normal;
}
.label {
    border-radius: 0.25em;
    color: #FFFFFF;
    display: inline;
    font-size: 75%;
    font-weight: bold;
    line-height: 1;
    padding: 0.2em 0.6em 0.3em;
    text-align: center;
    vertical-align: baseline;
    white-space: nowrap;
}
.fa {
    display: inline-block;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.fa-trash-o:before {
    content: "\f014";
}

上面的CSS生成带有垃圾图标的标签,但我需要交叉图标。请建议CSS更改以实现此目的。

1 个答案:

答案 0 :(得分:3)

font awesome version - 4.0.3,fa-times值为(&#xf00d;)/f00d

保留以供将来参考http://fontawesome.io/cheatsheet/