自定义选择框在IE中无法正常工作

时间:2016-09-12 13:49:10

标签: html css internet-explorer

我创建了一个自定义下拉框,可在此处查看:JSFIDDLE

布局正是我想要的,在Chrome和Firefox中它完美运行。但问题在于IE(11,10,9,8)。当您尝试单击蓝色箭头时,没有任何反应。如果您点击Chrome或Firefox中的蓝色箭头,则会打开下拉列表。我尝试使用几个CSS IE黑客但没有成功。谁能告诉我这是否可以解决?

我的CSS:

$stmt->error

1 个答案:

答案 0 :(得分:1)

更改.custom-select的CSS:匹配以下内容:

.custom-select:after {
background-color: #fff;
border-left: 1px solid #cacaca;    
content: "\25bc";
display: block;
font-size: 1em;
line-height: 1em;   
padding: 11px 13px 11px 11px;   
position: absolute;
right: 13px;    
text-align: center;
top: 3%;
width: 0;   
z-index: 2; 
box-sizing: inherit;
height:100%;

/* IE */
line-height: 3em\9;
padding: 0px 13px 0px 11px\9;
right: 0px\9;
width: 10px\9;
z-index: 1;

}