您可以在Jsfiddle中看到问题
这是我的代码:
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;
}
Run Code Online (Sandbox Code Playgroud)
HTML
<input type="submit" value="Submit" class="btn" />
Run Code Online (Sandbox Code Playgroud)
此按钮在Chrome,Opera,MIE中看起来不错,但在Firefox中看不到.
在所有浏览器中,"提交"文本上方和下方的空间为7px和7像素.
在Firefox中 - 8px和6像素.
有没有办法在Firefox中解决这个问题?
添加以下CSS以重置元素的填充和边框属性.
更新了JSFiddle:http://jsfiddle.net/r5vvac82/1/
.btn::-moz-focus-inner {
padding:0;
border:0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
84 次 |
| 最近记录: |