前言
Antd的Input组件在获得焦点
时,会展示一个可选提示框
,框中罗列之前输入过得值,当选择
提示框中的内容后
,input输入框的背景色
会变成蓝
色。
取消蓝色背景色
只需在当前页或全局添加如下css
input:-internal-autofill-previewed,
input:-internal-autofill-selected {
-webkit-text-fill-color: #2a2d33;
transition: background-color 5000s ease-out 0.5s;
}
不显示可选提示框
给input加上autoComplete="off"属性,这样输入框不会记录输入的信息