提问者:小点点

如何删除IE8中的默认下拉箭头?[重复]


这个css代码不行。

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

我的下拉列表代码:

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

select {
    width: 100px;
    height: 30px;
    -webkit-appearance: none; /* gets rid of default appearance in Webkit browsers*/
    -moz-appearance: none; /* Get rid of default appearance for older Firefox browsers */
    -ms-appearance: none; /* get rid of default appearance for IE8, 9 and 10*/
    appearance: none;
    background-color: none;
    border: none;
    border-top-right-radius: 0px;
    border-bottom-right-radius:0px;
    -webkit-border-top-right-radius:0px;
    -moz-border-bottom-right-radius:0px;
    background-image: url('../img/arrow_question.png');
    background-position: center;
    background-size: 30%;
    background-repeat: no-repeat;
}

找了半天也找不到解决办法。


共2个答案

匿名用户

使用外观:无以实现您所需的功能。

举个例子,

select{
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    background: url("yourBackroundImagePath.extension") no-repeat scroll 0 0 transparent;

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

希望这有帮助。

匿名用户

这有助于:

div {
    width: 80px;
    overflow: hidden;
    border: 1px solid black;
}
select {
    width: 100px;
    border: 0px;
}