【问题标题】:How can i change a Google Recaptcha Width?如何更改 Google Recaptcha 宽度?
【发布时间】:2017-07-11 15:19:53
【问题描述】:

我尝试在一个 ASPX 项目中实现 google recaptcha v1,为此我使用了一个 DLL,并且我的表单的所有字段都有一个控件验证器。

我的网站是响应式的,但我也可以更改我的 Google recaptcha 以变得响应式。

这是实现我的验证码的方法:

<div>
        <captcha:RecaptchaControl Theme="white"  
         ID="RecaptchaControl1" runat="server"
         PublicKey="mypublicKey"
         PrivateKey="myprivatekey" />  
</div>

我看起来像:

在响应模式下:我的设备宽度为:300px,但验证码为width: 318px,当我检查元素时发现:

#recaptcha_area, #recaptcha_table {
width: 318px !important;
}

注意:这是 Google Captcha 的默认样式,不是我的“inline-1”。

有人知道怎么做吗?

谢谢

【问题讨论】:

    标签: asp.net css captcha recaptcha


    【解决方案1】:

    让你的规则更具体:

    html #recaptcha_area, html #recaptcha_table {
        width: 300px !important;
    }
    

    【讨论】:

      【解决方案2】:

      将以下样式属性添加到 iframe 正上方的特定 div 元素

      html #recaptcha_area, html #recaptcha_table {
         transform: scale(0.77);
         -webkit-transform: scale(0.77);
         transform-origin: 0 0; 
         -webkit-transform-origin: 0 0;
      }
      

      【讨论】:

        猜你喜欢
        • 2015-02-25
        • 2018-10-28
        • 1970-01-01
        • 2015-04-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-12-11
        相关资源
        最近更新 更多