html - 样式内部 reCaptcha DIV?

标签 html css recaptcha

我正在尝试将 recaptcha div 置于我的表单中。外部 reCaptcha DIV 表现得很奇怪,

margin: 0 auto;
float: none;

没有效果。但相同的代码适用于内部 div。

enter image description here

我的问题是,我如何自定义 reCaptcha 内部 div,因为我得到的只是来自 Google 的以下代码以集成到我的表单(外部 DIV)中

<div id="c_rc" class="g-recaptcha" data-sitekey="xxxxxxxxxxxxxxxx-qLjkB6ixNKweR_2Kv"></div>

最佳答案

尝试使用外部 div 的类定位内部 div 并向下查询:

.g-recaptcha div div {
    margin: 0 auto;
    float: none;
}

关于html - 样式内部 reCaptcha DIV?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27805089/

相关文章:

html - Chrome 不显示 div

php - 如何使用 php 仅获取具有特定类的特定元素的 data-id 并将其插入数据库

javascript - Google reCaptcha 2 TypeError : a is null after calling grecaptcha. 重置

ajax - 使用AJAX的g验证码响应

javascript - 显示高分辨率图像

javascript - Extjs 表单和文本区域无法处理带尖括号的输入 ('<>' )。奇怪的行为,用户界面就死了

html - 文本对齐 : center and align-items: center not working horizontally

php - 为大型网站设计移动网站,需要您的意见

html - 在调整大小时,我缺少什么来阻止我的图像崩溃?

recaptcha - 强制 Google Recaptcha 挑战