CSS :before 添加的图标不会出现在 Chrome
Icon added with CSS :before does not appear on Chrome
我用过:
td.product-name dl.variation dd li:before {
font-family: "Font Awesome 5 Free";
content: "\f00c";
color: #000;
margin-right: 8px;
}
为每个列表元素添加一个图标:before
。
该图标在 Safari 上正常显示:
但不在 Chrome:
为什么?
这是我网站的 link:https://www.mydreamtattoo.com/checkout/?add-to-cart=3981
勾选图标列表在商品名称下方的订单评论table中。
我以前在其他地方用这个方法给:before
元素添加CSS图标,一直有效。这次没有。
发现问题,需要补充font-weight: 600;
我遇到了类似的问题,发现添加 font-weight: 900;
有效。
我用过:
td.product-name dl.variation dd li:before {
font-family: "Font Awesome 5 Free";
content: "\f00c";
color: #000;
margin-right: 8px;
}
为每个列表元素添加一个图标:before
。
该图标在 Safari 上正常显示:
但不在 Chrome:
为什么?
这是我网站的 link:https://www.mydreamtattoo.com/checkout/?add-to-cart=3981
勾选图标列表在商品名称下方的订单评论table中。
我以前在其他地方用这个方法给:before
元素添加CSS图标,一直有效。这次没有。
发现问题,需要补充font-weight: 600;
我遇到了类似的问题,发现添加 font-weight: 900;
有效。