首页 > 解决方案 > 通过 CSS 隐藏 Google recaptcha 徽章并显示法律文本?

问题描述

我们正在使用当前的 CSS 来删除我们网站上的 Google recaptcha 徽章:

<style>
    .grecaptcha-badge { 
        visibility: hidden; 
    }
</style>

正如预期的那样,现在看到了一个空白区域,ReCaptcha 徽章在各个页面上都位于该位置。我很感兴趣,最简单的方法是修改上面的代码,同时保持 recaptcha 徽章不可见,而是在空白处显示法律文本,即:

<small>This site is protected by reCAPTCHA and the Google
    <a href="https://policies.google.com/privacy">Privacy Policy</a>
    <a href="https://policies.google.com/terms">Terms of Service</a> apply.
</small>

标签: cssrecaptchacaptchainvisible-recaptcha

解决方案


要对所有浏览器隐藏 REcaptcha V3,请将其添加到您的自定义 CSS 中:

.rc-anchor-normal-footer {
    display: none !important;
}
.grecaptcha-badge { 
    visibility: hidden; 
}


推荐阅读