chrome浏览器input输入框的黄色背景如何设置为透明的

clipboard.png

如图在谷歌浏览器中input输入框的背景色为黄色,经过查找找到这个方法可以改变背景色,
input:-webkit-autofill{ box-shadow: 0 0 0px 1000px transparent inset !important;}
但是这个方法对纯色背景有用,可是想要如何变成透明呢,因为大的div有一张背景图片,如果不是透明而是纯色也不好看,求解?

阅读 10k
3 个回答
input{background:transparent;}

你说的应该是 启用自动完成功能的表单 引起的,设置为 autocomplete="off";

//例如
<input type="tel" name="mobile" id="mobile" value="" autocomplete="off" placeholder="">
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题