[英]How Do I Get Rid Of The Yellow Auto Complete Filler in Chrome?
I have this search box on my website, chrome suggests past searches.我的网站上有这个搜索框,chrome 会建议过去的搜索。 However, it dye's the search box yellow.
但是,它会将搜索框染成黄色。 I have tried to suggest ways to fix this and nothing works.
我试图提出解决这个问题的方法,但没有任何效果。 However When I paste my code back in the sources tab of inspect element it works!
但是,当我将代码粘贴回检查元素的源选项卡时,它起作用了! I believe chrome is replacing my code, and then inspect replaces theirs, however, I don't know how to stop it from replacing mine.
我相信 chrome 正在替换我的代码,然后检查替换他们的代码,但是,我不知道如何阻止它替换我的代码。
I am trying to get rid of the yellow, not fully delete the autocomplete feature.我试图摆脱黄色,而不是完全删除自动完成功能。
My Code Looks Like:我的代码看起来像:
However Chrome Inspect Element Sources Looks Like:
但是 Chrome Inspect Element Sources 看起来像:
input[type=text]:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px white inset; }
<div class="Search1"> <div class="inputWithIcon"> <input type="text" placeholder="Channel ID" id="chnlname" class="Input2" :-webkit-autofill></input> <i class="fa fa-search" aria-hidden="true" id="update"></i> </div> </div>
Thats what I am currently using.这就是我目前正在使用的。
假设您想保留填充物,但可以根据自己的喜好更改颜色,请看一下这篇文章-对于您的问题,它应该是理想的: https : //css-tricks.com/snippets/css/change-autocomplete-styles- WebKit的浏览器/
Could be the :active
state is causing the yellow. :active
状态可能导致黄色。 Credit to Nathan White for this trick: 感谢Nathan White的技巧:
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
transition: background-color 5000s ease-in-out 0s;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.