html - 当我选择下拉菜单时,重叠在 IE9 和 IE8 中的箭头上选择了蓝色 bg

标签 html css frontend

我为选择标签使用了背景图片,当我选择下拉菜单时,我在 IE 中选择的蓝色与图片上的颜色重叠。

请看这个链接你会看到我的问题http://media300.dropshots.com/photos/1103166/20130528/085932.jpg

这是我想要的,当选择选项时选择背景颜色无。它在 Chrome、Firefox 和 safari 中正常工作。仅在 IE 中出现问题。我为此使用了以下代码

.selectbox {
    width: 240px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #c2d6ea;
    overflow: hidden;
    margin-bottom: 0.5em;
    background: url(../images/select.jpg) no-repeat center right;
}

.selectbox select {
    -webkit-user-modify: policy;
    border-radius: 4px;
    margin: 0;
    color: #003399;
    width: 268px;
    padding: 7px 3px;
    outline: 0;
    border: 0;
    background-color: transparent;
    background-image: none;
    -webkit-appearance: none;
    box-shadow: none;
}

最佳答案

尝试将这些行添加到您的选择框

.selectbox{
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

关于html - 当我选择下拉菜单时,重叠在 IE9 和 IE8 中的箭头上选择了蓝色 bg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16792833/

相关文章:

css - 我如何管理内容之间的这种无形差距?

html - 如何删除导航栏和标题之间的空间或间隙

javascript - 样式 facebook likebox 滚动条

javascript - 根据 URL 动态更改 DIV 的 css - Angular

html - 我怎样才能使网格(设计)响应?

javascript - 你什么时候在 react 中使用类组件,因为 useState 现在在功能组件中可用

php - 为每一行选择一个单选按钮

javascript - 在移动设备上滚动时出现不需要的行为(根据视口(viewport)大小添加/删除类)

html - 如何对齐 Bootstrap Dropright 菜单,使其向上打开(与默认的向下方向不同)?

javascript - 用户如何在 session 期间调整 html 表格列宽