chrome浏览器input的自动完成,点击之后自动输入,input的背景会变成香蕉黄,用如下方法修复:

/* Change the white to any color ;)
就是给input设置内置阴影!而且一定要大,至少要比你的input本身大,不过,box-shadow是很慢的,
而且,如果你的input是用图片做背景的话,是没有办法做这么干的*/
input:-webkit-autofill {
-webkit-box-shadow: 0 0 0 100px white inset;
}
/* Additionally, you can use this to change the text color: */
-webkit-text-fill-color: yellow !important;

或者

/* Change Autocomplete styles in Chrome*/
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus
input:-webkit-autofill,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
border: 1px solid green;
-webkit-text-fill-color: green;
-webkit-box-shadow: 0 0 0px 1000px #000 inset;
transition: background-color 5000s ease-in-out 0s;
}

或者直接关闭chrome的自动完成

<input type="text" autocomplete="off">

<form autocomplete="off"></form>

参考:https://stackoverflow.com/questions/2781549/removing-input-background-colour-for-chrome-autocomplete
           https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/

最新文章

  1. Node.js之路【第三篇】NodeJS异步实现
  2. Nginx-默认不压缩HTTP/1.0与长连接的关系
  3. 关于NK3C使用富文本编辑器(CKEditor)发送HTML邮件的使用说明
  4. Mvc4_Area的应用
  5. Storm中tuple的可靠性
  6. js正则验证手机号
  7. Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. T
  8. poj 3009 Curling 2.0( dfs )
  9. 三大主流ETL工具选型
  10. 动态加载JS过程中如何判断JS加载完成
  11. java调用shell脚本
  12. 转:Validation of viewstate MAC failed异常的原因及解决方法
  13. 51nod 1270 数组的最大代价 思路:简单动态规划
  14. Spring Security 入门(1-8)缓存EhCache
  15. Aspnet mvc移除WebFormViewEngine
  16. 自学Python3.2-函数分类(内置函数)
  17. 使用django发送邮件(smtp)
  18. R中基本函数学习[转载]
  19. Elasticsearch 基础入门
  20. css布局---各种居中

热门文章

  1. pycharm 使用技巧
  2. Python 继承、派生、组合、接口、抽象类
  3. k8s1.13.0二进制部署-node节点(四)
  4. mongodb 导入导出
  5. Dojo的declare接口
  6. AddDbContext was called with configuration, but the context type &#39;NewsContext&#39; only declares a parameterless constructor?
  7. vue 报错unknown custom element解决方法
  8. @private@protected@public@package
  9. GCD和NSThread延时执行对比
  10. 洛谷 P5016 龙虎斗