css - 通过 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>
解决方案
要对所有浏览器隐藏 REcaptcha V3,请将其添加到您的自定义 CSS 中:
.rc-anchor-normal-footer {
display: none !important;
}
.grecaptcha-badge {
visibility: hidden;
}
推荐阅读
- javascript - 使用 .sort 从数组 asc 或 desc 排序数据
- r - 在 R 中为两个向量创建所有排列
- android - onBackPressed() 应用程序未关闭
- php - 如何删除多个连接,执行需要更多时间。如何改善查询结果
- java - Java中将JSON字符串转换为ArrayList的ArrayList
- php - 使用事件名而不是 ID 删除记录
- python - 把函数放在后台
- javascript - d3.js 如何仅将那些节点动态添加到可折叠树中,从数据表中选择
- reactjs - 让图标出现在 React - 三元表达式
- c# - 如何用文本填充和显示数组中的空元素