【问题标题】:Remove select arrow in IE [duplicate]删除 IE 中的选择箭头 [重复]
【发布时间】:2014-04-01 14:42:59
【问题描述】:

我使用 SO
How to remove the arrow from a select element in Firefox
上的方法从选择元素中删除了下拉箭头,但我仍然需要 IE 的解决方案。有什么建议吗?
jsfiddle
HTML:

<div class="select-wrap">
  <select class="input-country" name="country">
    <option value="">-Select Country-*</option>
    <option value="US" selected="selected">USA</option>
    <option value="AF">AFGHANISTAN</option>
    <option value="AL">ALBANIA</option>
  </select>
<div>

CSS:

.select-wrap {
width: 340px;
height: 40px;

border: 1px solid black;
}
select {
width: 340px;
height: 100%;
margin: auto 0;
padding-bottom: 4px;
border: none;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
text-indent: 0.01px;
text-overflow: ''; 
}

我希望有一个纯 CSS 的解决方案。

【问题讨论】:

    标签: html css internet-explorer


    【解决方案1】:

    试试这个:

    select::-ms-expand {
    display: none;
    }
    

    请注意,这适用于 IE10+

    【讨论】:

    猜你喜欢
    • 2013-12-08
    • 2013-02-27
    • 1970-01-01
    • 2013-06-09
    • 2013-05-24
    • 2021-12-07
    • 2014-04-22
    • 2014-09-28
    相关资源
    最近更新 更多