html - 在自动完成表单上将输入背景更改为透明

标签 html css

我想在浏览器自动完成我的表单时将背景颜色设置为对我的输入透明,目前看起来像添加的图像,有人知道如何实现吗?

我已经试过了,但它设置为白色,边框的样式默认为黄色,我希望文本的颜色也为白色。

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
}

它是这样的:

enter image description here

提前致谢:)

最佳答案

最后我用这段代码得到了结果:

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: #fff !important;
}

关于html - 在自动完成表单上将输入背景更改为透明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29580704/

相关文章:

javascript - 使用jquery在多个html文件中搜索字符串

html - 隐藏的登录表单 HTML

javascript - 语义 UI - 搜索选择不起作用

javascript - 如何使悬停在事件按钮上不使用悬停效果?

css - Firefox 无法在站点页眉/页脚中正确呈现链接

PHP 从我的循环中删除最后一个字符

css - Materialise CSS 通知计数不显示计数数字

css - 尝试使用 css 制作一条居中的 - 除非太长 - 一行,图片标题

jQuery 点击时未定位正确的元素

jquery - 处理多个动画的jquery有什么更优雅的解决方案