我已经为下拉菜单编写了 CSS,并在其上应用了背景色。它在 IE 7、8、9、10、Chrome、FF、Safari(窗口)上运行良好。但在 mac 系统中它不显示背景颜色。
在 mac 中它应用白色背景。
这是我的网站网址 http://www.earlylearninghq.org.uk/并查看搜索框旁边的下拉菜单。
这是我的CSS代码
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selecter .selecter-selected {
background-color: #80B83B;
background: url(http://www.earlylearninghq.org.uk/wp-content/themes/10eight/Search-bar-Arrow.png) no-repeat right 3px center;
color: #fff;
cursor: pointer;
display: block;
font-size: 13px;
margin: 0;
overflow: hidden;
padding: 6px 24px 4px 9px;
position: relative;
text-overflow: clip;
z-index: 2;
width: 64px;
margin-top : -27px;
}
谁能帮帮我?
最佳答案
只需从您的类(class)中删除背景属性。看起来它正在申请两次。
@media screen and (-webkit-min-device-pixel-ratio:0) {
.selecter .selecter-selected {
background-color: #80B83B;
/*background: url(http://www.earlylearninghq.org.uk/wp-content/themes/10eight/Search-bar-Arrow.png) no-repeat right 3px center;*/
color: #fff;
cursor: pointer;
display: block;
font-size: 13px;
margin: 0;
overflow: hidden;
padding: 6px 24px 4px 9px;
position: relative;
text-overflow: clip;
z-index: 2;
width: 64px;
margin-top : -27px;
}
}
关于html - CSS背景色在safari mac系统中取用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25093500/