版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_36671474/article/details/77980502
chrome表单input获取焦点时,input会有一个记录之前填写过的文本的下拉列表式的东东,当你选择其中一个时,input文本框的背景会变成黄色的(如下图),这是由于chrome会默认给input加上input:-webkit-autofill私有属性,然后对其赋予以下样式:
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {
background-color: rgb(250, 255, 189);
background-image: none;
color: rgb(0, 0, 0);