我将下面的简单 css 代码用于选择字段,它适用于我测试过的所有浏览器,除了 IE7、Chrome 10 和 Opera 11。
background: url(../images/standard-select-bg.png) no-repeat;
这些浏览器有哪些选择?
最佳答案
对于单项选择:
- 使用
background-color: transparent
,Firefox 显示图像,Chrome 和 Opera 不显示。 - 使用
background-color: rgba(0,0,0,0)
,所有浏览器都显示图像。
对于多项选择:
- Opera 仅在使用
background-color: rgba(0,0,0,0)
时显示图像,Firefox 和 Chrome 在所有情况下均显示。
至少在 Opera 11.10beta 中工作
关于internet-explorer-7 - IE 7、Chrome 10 和 Opera 11 不支持选择字段的 css 背景 - 选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5358160/