最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make google recaptcha responsive with width 100% - Stack Overflow

programmeradmin0浏览0评论

I need to make google recaptcha responsive not with transform scale only with width 100% and other but not transform scale. I am Searching many other sites but many of them only use transform scale.

here is a image.

I need to make google recaptcha responsive not with transform scale only with width 100% and other but not transform scale. I am Searching many other sites but many of them only use transform scale.

here is a image.

Share edited May 22, 2018 at 7:39 rink.attendant.6 46.5k64 gold badges110 silver badges157 bronze badges asked May 18, 2018 at 7:47 Ahsan AbrarAhsan Abrar 1393 silver badges14 bronze badges 3
  • 2 Can you add your HTML and CSS? Without that it's very hard to help you. – CodeF0x Commented May 18, 2018 at 7:49
  • No because i am using API but I'm overwrite this CSS. thanks – Ahsan Abrar Commented May 18, 2018 at 7:52
  • Then I think this post may help you: stackoverflow./questions/27691411/… – CodeF0x Commented May 18, 2018 at 7:57
Add a ment  | 

3 Answers 3

Reset to default 4

The problem with Google Recaptcha is, that it is loading in an IFrame, so styles do not apply.

You can do like this

<div class="g-recaptcha" data-sitekey="xxxx" style="transform:scale(0.88);-webkit-transform:scale(0.88);transform-origin:0 0;-webkit-transform-origin:0 0;"></div>

or

<div class="g-recaptcha" data-sitekey="xxxx" data-size="pact"></div>

Without knowing your code I'm not 100% sure but try like this:

css

#patherdivofgooglecaptcha * {width: 100%}

If it works but some elements bee too big just limit the CSS where you need it, or if it is an iframe try to give 100% directly on the container and not to the children.

发布评论

评论列表(0)

  1. 暂无评论