如何根据容器大小调整谷歌验证码的大小

问题描述 投票:0回答:1

需要在容器中对齐验证码。

代码-

<div id="googleRecaptcha" class="">
        <div  class="g-recaptcha" data-sitekey="${siteKey}" data-callback="" data-expired-callback="">
        </div>
        </div>

验证码右边框不可见

javascript recaptcha
1个回答
0
投票

.g-recaptcha 类被赋予了transform: scale(0.8); 属性,它将小部件缩小到其原始大小的 80%。变换原点:0 0;属性确保从左上角应用缩放,保持对齐。

.g-recaptcha {
    transform: scale(0.8);
    transform-origin: 0 0; /* Set the origin to the top-left corner to maintain alignment */
}
© www.soinside.com 2019 - 2024. All rights reserved.