给input框设置&:-webkit-autofill
input{
width: 100%;
background: inherit;
box-shadow: inherit;
border: none;
outline: none;
color: $white;
&:-webkit-autofill{
-webkit-text-fill-color: $white !important;
-webkit-box-shadow: 0 0 0px 1000px transparent inset !important;
background-color:transparent;
background-image: none;
transition: background-color 50000s ease-in-out 0s;
//背景色透明 生效时长 过渡效果 启用时延迟的时间
}
}
效果
参考链接https://www.cnblogs.com/sherryweb/p/13802784.html