如何在Firefox中删除<select>元素大纲?</select>

时间:2014-03-28 16:32:01

标签: html css

所以这里有一个小提示来证明问题:http://jsfiddle.net/CVTrb/1/,点击并选择任何选项,然后你会看到一条细灰线显示并不完全位于{{1元素。

这是一张证明这一点的图片:

Here's an image demonstrating this

3 个答案:

答案 0 :(得分:4)

outline: none;添加到.form-dropdown

答案 1 :(得分:4)

在此信息这篇文章:https://stackoverflow.com/a/18853002/1261316

select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 #000;
}

答案 2 :(得分:0)

我要添加一个调整:
如果您已经禁用了选项,那么文本阴影就会使它们变得丑陋

select:-moz-focusring {
    color: transparent;  /* hides that darn border... and the options */
    text-shadow: 0 0 0 #000;   /* "unhide" the options */
}
select:-moz-focusring option:disabled {
    text-shadow: none;     /* remove the inherited shadow from disabled options */
}