ReCaptcha API v2 Styling

前端 未结 18 1811
孤城傲影
孤城傲影 2020-11-28 02:59

I have not had much success finding how to style Google\'s new recaptcha (v2). The eventual goal is to make it responsive, but I am having difficulty applying styling for ev

18条回答
  •  春和景丽
    2020-11-28 03:44

    I use below trick to make it responsive and remove borders. this tricks maybe hide recaptcha message/error.

    This style is for rtl lang but you can change it easy.

    .g-recaptcha {
        position: relative;
        width: 100%;
        background: #f9f9f9;
        overflow: hidden;
    }
    
    .g-recaptcha > * {
        float: right;
        right: 0;
        margin: -2px -2px -10px;/*remove borders*/ 
    }
    
    .g-recaptcha::after{
        display: block;
        content: "";
        position: absolute;
        left:0;
        right:150px;
        top: 0;
        bottom:0;
        background-color: #f9f9f9;
        clear: both;
    }
    

提交回复
热议问题