Chrome Autofill/Autocomplete no value for password

后端 未结 20 1976
逝去的感伤
逝去的感伤 2020-11-27 02:57

When you have saved username and password for some site Chrome will autofill that username and password, but if you try to get the value for the password input field it is e

20条回答
  •  醉酒成梦
    2020-11-27 03:22

    To me none of this solutions seemed to work.

    I think this is worth mentioning that if you want to use it for CSS styling you sould use -webkit-autofill property like this:

    input:-webkit-autofill~.label,
    input:-webkit-autofill:hover~.label, 
    input:-webkit-autofill:focus~.label
    input:focus~.label,
    input:not(.empty)~.label {
      top: -12px;
      font-size: 12px;
      color: rgba(0, 0, 0, .4);
      font-weight: 600
    }
    
    

提交回复
热议问题