css - 如何去掉mac下chorme user agent stylesheet 给记住用户名的 input 框添加的黄色背景
本文介绍了css - 如何去掉mac下chorme user agent stylesheet 给记住用户名的 input 框添加的黄色背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
这个问题刚刚问过了,两种方法都试了一下,还是不行,再次麻烦大家给点建议,
之前的链接在此:
https://segmentfault.com/q/10...
解决方案
我在 Google Chrome 版本 54.0.2840.99 m
测试是OK的,HTML
页面代码如下,注释掉style
才会看到那个屎黄色
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试chrome自动填充</title>
<style>
input:-webkit-autofill {
-webkit-box-shadow:0 0 0 100px white inset;
-webkit-text-fill-color: #666;
}
input:-webkit-autofill:focus {
-webkit-box-shadow:0 0 0 100px white inset;
-webkit-text-fill-color: #666;
}
</style>
</head>
<body>
<form action="http://baidu.com" method="POST">
<input type="text" name="username">
<input type="submit" value="提交">
</form>
</body>
</html>
这篇关于css - 如何去掉mac下chorme user agent stylesheet 给记住用户名的 input 框添加的黄色背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文