How to hide the Google Invisible reCAPTCHA badge

前端 未结 15 2175
感情败类
感情败类 2020-12-02 04:15

When implementing the new Google Invisible reCATPTCHA, by default you get a little \"protected by reCAPTCHA\" badge in the bottom right of the screen that pops out when you

15条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 05:01

    Since hiding the badge is not really legit as per the TOU, and existing placement options were breaking my UI and/or UX, I've come up with the following customization that mimics fixed positioning, but is instead rendered inline:

    You just need to apply some CSS on your badge container:

    .badge-container {
      display: flex;
      justify-content: flex-end;
      overflow: hidden;
      width: 70px;
      height: 60px;
      margin: 0 auto;
      box-shadow: 0 0 4px #ffffd;
      transition: linear 100ms width;
    }
    .badge-container:hover {
        width: 256px;
    }
    

    I think that's as far as you can legally push it.

提交回复
热议问题