问题:项目是react框架,引用antd中的input输入框样式,当在input框输入完成时,并未出现,背景黄色样式,当时,当数据走到另外一个页面,而后在返回当时输入过的input的地方时,发现,input框自动带有默认样式背景黄.当时百度了不少前端大佬的方法,都没有起做用,最后,发现解决方法:css
前提:在作一次政府项目的时候,window6是没有出现此bug的,window10的电脑就会浮现此问题,前端
方法以下:react
把值改到最大,记住最大,不少人吝啬数据,值写了1000px,可是是没用的,值必须往万上加web
bug样式分析:antd
之因此出现这样的样式, 是由于Chrome会自动为input增长以下样式.框架
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { background-color: rgb(250, 255, 189); background-image: none; color: rgb(0, 0, 0); }
解决方式 :ui
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active{box-shadow: 0 0 0px 100000000px #ffffff inset !important;}