关闭chrome浏览器的input香蕉黄背景
2024-08-29 19:29:51
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/
最新文章
- Node.js之路【第三篇】NodeJS异步实现
- Nginx-默认不压缩HTTP/1.0与长连接的关系
- 关于NK3C使用富文本编辑器(CKEditor)发送HTML邮件的使用说明
- Mvc4_Area的应用
- Storm中tuple的可靠性
- js正则验证手机号
- 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
- poj 3009 Curling 2.0( dfs )
- 三大主流ETL工具选型
- 动态加载JS过程中如何判断JS加载完成
- java调用shell脚本
- 转:Validation of viewstate MAC failed异常的原因及解决方法
- 51nod 1270 数组的最大代价 思路:简单动态规划
- Spring Security 入门(1-8)缓存EhCache
- Aspnet mvc移除WebFormViewEngine
- 自学Python3.2-函数分类(内置函数)
- 使用django发送邮件(smtp)
- R中基本函数学习[转载]
- Elasticsearch 基础入门
- css布局---各种居中
热门文章
- pycharm 使用技巧
- Python 继承、派生、组合、接口、抽象类
- k8s1.13.0二进制部署-node节点(四)
- mongodb 导入导出
- Dojo的declare接口
- AddDbContext was called with configuration, but the context type &#39;NewsContext&#39; only declares a parameterless constructor?
- vue 报错unknown custom element解决方法
- @private@protected@public@package
- GCD和NSThread延时执行对比
- 洛谷 P5016 龙虎斗