Detecting Browser Autofill

前端 未结 29 1408
天涯浪人
天涯浪人 2020-11-22 06:15

How do you tell if a browser has auto filled a text-box? Especially with username & password boxes that autofill around page load.

My first question is when does

29条回答
  •  伪装坚强ぢ
    2020-11-22 06:39

    I also faced the same problem where label did not detect autofill and animation for moving label on filling text was overlapping and this solution worked for me.

    input:-webkit-autofill ~ label {
        top:-20px;
    } 
    

提交回复
热议问题