这个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;
}
找了半天也找不到解决办法。
使用外观:无代码>以实现您所需的功能。
举个例子,
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;
}