【发布时间】:2019-11-25 14:31:00
【问题描述】:
我的产品页面的屏幕截图,显示 SSSSS 代替星星。我刚刚用最新版本升级了我的主题和 woocommerce 并开始面临这个问题。在此之前一切正常。
我已搜索过该问题,但找不到任何解决方案。可能是什么问题?我对 woocommerce 有点陌生
我检查了css 文件并显示'\53\53' 和\73\73 符号我需要用\e021 替换它吗?
更新:
这个代码已经在我的woocommerce.scss中了
/**
* Star ratings
*/
.star-rating {
float: right;
overflow: hidden;
position: relative;
height: 1em;
line-height: 1;
font-size: 1em;
width: 5.4em;
font-family: 'star';
&::before {
content: '\73\73\73\73\73';
color: darken( $secondary, 10% );
float: left;
top: 0;
left: 0;
position: absolute;
}
span {
overflow: hidden;
float: left;
top: 0;
left: 0;
position: absolute;
padding-top: 1.5em;
}
span::before {
content: '\53\53\53\53\53';
top: 0;
position: absolute;
left: 0;
}
}
.woocommerce-product-rating {
@include clearfix();
line-height: 2;
display: block;
.star-rating {
margin: 0.5em 4px 0 0;
float: left;
}
}
【问题讨论】:
-
"我检查了 css 文件并显示 '\53\53' & \73\73 符号我需要用 \e021 替换它吗?"出色地?你试过吗?发生了什么?
-
我在 firebug 中尝试过,但没有成功。
-
Firebug 并不总是与更改 CSS 和加载页面相同。您是否确认字体 正在 加载?字体未加载或您试图显示字体中不存在的字符(即:对所需图标使用错误的字符)。
-
网站不加载 SCSS 文件。尝试像我之前建议的那样更改符号并重新编译您的 CSS 样式表。
-
@helgatheviking 正如你所说,我已经更新了 CSS 样式表中的符号,但仍然无法正常工作。
标签: php css woocommerce