因此,自我启动此网站(https://shop.cafedumonde.com/)以来,我一直遇到此问题。每当我单击“添加到购物车”按钮时,按钮都会展开,并且“字体真棒”中的向右箭头图标会出现。它从来没有做过,我尝试了各种方法使其正常工作,但无济于事。这是我正在使用的代码。首先是HTML:
<div class="wp-block-button wc-block-grid__product-add-to-cart">
<a href="?add-to-cart=46198" aria-label="Add “Beignet Mix” to your cart" data-quantity="1" data-product_id="46198" data-product_sku="R2A" rel="nofollow" class="wp-block-button__link add_to_cart_button ajax_add_to_cart">Add to cart</a>
</div>
CSS:
.wc-block-grid__product-add-to-cart a.added::after {
color: #fff;
content: '\f0a9';
font-family: "Font Awesome 5 Free";
font-style: normal;
font-weight: normal;
text-decoration: inherit;
}