创建按钮时Firefox中的Css-1px差异

创建按钮时Firefox中的Css-1px差异,css,firefox,Css,Firefox,你可以从中看出问题所在 这是我的代码: CSS .btn { text-align: center; color: #333; font-weight: 700; font-size: 11px; font-family: tahoma, verdana, arial, helvetica; background: -webkit-linear-gradient(#fefefe, #e7e7e7); background: -o-li

你可以从中看出问题所在

这是我的代码:

CSS

   .btn {
    text-align: center;
    color: #333;
    font-weight: 700;
    font-size: 11px;
    font-family: tahoma, verdana, arial, helvetica;
    background: -webkit-linear-gradient(#fefefe, #e7e7e7);
    background: -o-linear-gradient(#fefefe, #e7e7e7);
    background: -moz-linear-gradient(#fefefe, #e7e7e7);
    background: linear-gradient(#fefefe, #e7e7e7);
    height: 24px;
    width: auto;
    overflow: visible;
    border: 1px solid #c4c4c4;
    padding: 0 10px;
    line-height: 22px;
    border-radius: 3px;
}
.btn:hover {
    color: #111;
    border: 1px solid #555;
}
HTML

<input type="submit" value="Submit" class="btn" />

这个按钮在Chrome、Opera、MIE中看起来还可以,但在Firefox中则不行

在所有浏览器中,“提交”文本上方和下方的空间分别为7px和7px

在Firefox-8px和6px中

有没有办法在Firefox中解决这个问题


添加以下CSS以重置元素的填充和边框属性

更新的JSFIDLE:

.btn::-moz-focus-inner {
    padding:0;
    border:0;
}