如何用fontawesome替换默认的woocomerce星空掠夺图标?

问题描述 投票:0回答:1

我正在尝试将默认的woocommerce明星突袭图标更改为超棒的字体图标

但是字体惊人的代码放置了错误的图标,而不是我所需要的

attached image

我正在尝试用实心圆圈替换星星,但是我得到的图标是一个空圆圈。

可能是字体版本问题吗?知道如何解决这个问题吗?

因为我找到的我需要的填充图标的css内容代码实际上是我在css案例中用来替换星标图标的css内容代码:

.woocommerce .star-rating:before{
    font-family: 'FontAwesome' !important; 
    content: '\f111\f111\f111\f111\f111' !important;
    color: #d5d5d5 !important;
}

.woocommerce .star-rating span:before{
    font-family: 'FontAwesome' !important; 
    content: '\f111\f111\f111\f111\f111' !important;
    color: #FF9800 !important;
}

但是我得到的只是一个空的圆圈。

css wordpress icons font-awesome
1个回答
0
投票
您使用了错误的密码。

.woocommerce .star-rating:before { font-family: 'FontAwesome' !important; content: '\f006\f006\f006\f006\f006' !important; color: #d5d5d5 !important; } .woocommerce .star-rating span:before { font-family: 'FontAwesome' !important; content: '\f005\f005\f005\f005\f005' !important; color: #FF9800 !important; }
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="woocommerce">
  <div class="star-rating"><span></span></div>
</div>
© www.soinside.com 2019 - 2024. All rights reserved.