如何在Mac上的Safari中的选择元素上删除光泽? [英] How can I remove the gloss on a select element in Safari on Mac?
本文介绍了如何在Mac上的Safari中的选择元素上删除光泽?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Mac和iOS设备上,在Safari中,具有背景颜色的< select>
元素会在其本身产生光泽。这在其他操作系统中似乎不会发生。
例如,我有一个带有这些样式属性的select元素:
select {
-moz-border-radius:3px;
-webkit-edge-radius:3px;
border-radius:3px;
padding:3px 6px;
margin:10px 0 7px;
width:250px;
background-color:#BD2786;
color:white;
letter-spacing:-.04em;
font-weight:bold;
border:0;
}
我的元素有我想要的背景颜色, 。是否有人知道如何使它变成平面颜色?
解决方案
你必须写
-webkit-appearance:none;
请阅读这篇文章。
http://trentwalton.com/2010/07/14/css-webkit-appearance/
On Macs and iOS devices, in Safari, a <select>
element with a background color generates a gloss over itself. This does not seem to happen in other operating systems.
For example, I have a select element with these style properties:
select {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
padding: 3px 6px;
margin: 10px 0 7px;
width: 250px;
background-color: #BD2786;
color: white;
letter-spacing: -.04em;
font-weight: bold;
border: 0;
}
And my element has the background color I want, but the gloss is still there. Does anyone know how to make it a flat color?
解决方案
@beanland; You have to write
-webkit-appearance:none;
in your css.
read this http://trentwalton.com/2010/07/14/css-webkit-appearance/
这篇关于如何在Mac上的Safari中的选择元素上删除光泽?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文