改变fa-fa心脏的边框颜色

时间:2016-05-26 11:48:56

标签: html css

如何更改fa -fa heart图标的边框颜色。

我希望边框颜色为白色

<i class="fa fa-heart heart fa-2x" aria-hidden="true">

我想将确切的心脏边框颜色更改为白色,请任何人帮助我

4 个答案:

答案 0 :(得分:2)

&#13;
&#13;
body{
  background:#000;
}
.heart {
  color: #fff; 
}
&#13;
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" />
<i class="fa fa-heart-o heart fa-2x" aria-hidden="true">
&#13;
&#13;
&#13;

使用fa-heart-o代替fa-heart,然后使用css color属性,这样你就可以着色边框,但它只是一个有边界的心脏。

答案 1 :(得分:0)

&#13;
&#13;
.hhhh {
    float: left;
    position: relative;
}
.heart {
    color: #000000;
    font-size: 30px;
}
.heart1 {
    bottom: 1px;
    font-size: 28px;
    left: 1px;
    position: absolute;
    right: 1px;
    top: 1px;
}
&#13;
&#13;
&#13;

答案 2 :(得分:0)

有使用font-awesome字体的gererating图标,所以我们不能将border-color设置为任何font-icon

答案 3 :(得分:0)

&#13;
&#13;
.hhhh {
    float: left;
    position: relative;
}
.heart {
    color: #000000;
    font-size: 30px;
}
.heart1 {
    bottom: 1px;
    font-size: 28px;
    left: 1px;
    position: absolute;
    right: 1px;
    top: 1px;
}
&#13;
<div class="hhhh">
  <i class="fa fa-heart heart fa-2x" aria-hidden="true"></i>
  <i class="fa fa-heart heart1 fa-2x" aria-hidden="true"></i>
</div>
&#13;
&#13;
&#13;

相关问题