css - 自定义下拉不工作 IE 和 Firefox

标签 css html firefox

我的下拉选项菜单有一个自定义 img,我尝试了其他浏览器,如 Internet Explorer 和 FireFox...

我的代码:

textarea {
    background: #9d9d9d;
    color: #000000;
    width: 90%;
    padding: 5px;
    border-radius:5px;
    -moz-border-radius:5px;
    -webkit-border-radius:5px;
}
.styled-select {
   width: 88%;
   height: 30px;
   overflow: hidden;
   background: url('../img/down.png') no-repeat right #9d9d9d;
   border: 1px solid #ccc;
   border-radius:5px;
   -moz-border-radius:5px;
   -webkit-border-radius:5px;
}

This is the drop down on firefox

This is the Drop Down on Internet Explorer

第一个 img 用于 Firefox 第二个 img 用于 Internet Explorer

最佳答案

对于 I.E:

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

对于火狐:

.select
{
-moz-appearance: none; 
 appearance: none;    
 text-overflow: ''; 
}

关于css - 自定义下拉不工作 IE 和 Firefox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19810658/

相关文章:

html - 如何在 HTML 表格单元格的中心垂直对齐数据?

jquery - 使用 CSS3 旋转时无法淡出

JavaScript 不适用于 FireFox

android - Firefox Android 源代码

javascript - 为要使用的 jquery 函数添加多个参数的正确方法

jquery - 颜色框未正确触发 "Uncaught TypeError: Object [object Object] has no method ' 颜色框'"

css - 键盘将模态弹出窗口中的文本字段推到顶部

html - 如何使内容 CSS 属性语法在 IE 和 Firefox 中工作?

javascript - 替代 li 元素的(不推荐使用的)value 属性

html - 不能并排排列元素