css - 选择背景白色/透明 - Chrome OSx

标签 css macos google-chrome html-select

在我的一生中,我无法在 OSx 上的 Chrome 中删除选择框上的背景/框阴影。我需要它像其他输入一样是纯白色的。看这里:

http://index1.staging.homeflow.co.uk/pdrum/register.html

一些正在使用的代码没有完成这项工作:

background: #ffffff;
background: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#ffffff));
background: -moz-linear-gradient(top, white, white);
background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 1) 0px, rgba(255, 255, 255, 1) 0px);
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;

最佳答案

尝试:

select{
   -webkit-appearance: none;
   box-shadow: none !important;
}
:-webkit-autofill { color: #fff !important; }

您可能还想使用:

select:focus { outline: none; }

关于css - 选择背景白色/透明 - Chrome OSx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22013947/

相关文章:

google-chrome - Google Chrome 中奇怪的 HTTP header 格式(:host, :method, ...)

google-chrome - 文本字段在表格中时忽略最小宽度......有什么解决方法吗?

html - 使用 CSS 自定义类型的输入

macos - VIM 长 yaml 真的很慢

html - 使标题下划线时尚的不同方法是什么?

ruby - rake 使用的 Gem 路径与 OS X 上的系统路径不同

macos - OSX 10.8 OpenGL扩展

javascript - Famo.us 最大接触点(Windows 8 + Chrome)

jquery - 如何使用 CSS3 实现平滑的视差滚动跨浏览器、跨平台

html - Span 文本换行与第一行对齐