我可以在支付页面Shopify中隐藏div类吗



我有这个代码,它已经在Shopify结账(付款(页面中实现了,不幸的是,Shopify不允许编辑这个页面,但你可以在Shopify的结账设置中添加一些css或html代码。结账设置shopify

我需要隐藏这个div类PayPal

<div class="radio-wrapper content-box__row " data-gateway-group="express" data-gateway-name="paypal" data-select-gateway="37585059906" data-submit-i18n-key="complete_order">
<div class="radio__input">
<input class="input-radio" id="checkout_payment_gateway_37585059906" data-backup="payment_gateway_37585059906" aria-describedby="payment_gateway_37585059906_description" aria-controls="payment-gateway-subfields-37585059906" type="radio" value="37585059906" checked="checked" name="checkout[payment_gateway]">
</div>
<div class="radio__label  ">
<label for="checkout_payment_gateway_37585059906" class="radio__label__primary content-box__emphasis">
<img alt="PayPal" class="offsite-payment-gateway-logo" src="//cdn.shopify.com/shopifycloud/shopify/assets/checkout/offsite-gateway-logos/paypal@2x-768388b0667bef1aa9a7cf02fa1cc2184c2915a90d4cdd62dde223f74f2acbfc.png">
<span class="visually-hidden">
PayPal
</span>

你能告诉我哪些代码可以粘贴到样式框shopify中吗?。我需要在上面隐藏这个元素。

let redBox = document.getElementById("targetElement");
let hideButton = document.querySelector("button");
hideButton.addEventListener('click', _ => {
redBox.style.display = 'none';
});
#targetElement{
width : 200px;
height : 200px;
background-color : red;
}
<div id="targetElement">
</div>
<button type="button">Hide</button>

您需要使用";显示:无";在您想要隐藏的div元素中。

相关内容

  • 没有找到相关文章

最新更新