我想制作< button>和< a>看起来一样.我发现了一个类似的帖子,建议添加
Box-sizing: content-Box;
-webkit-Box-sizing: content-Box;
-moz-Box-sizing: content-Box;
但是,在Firefox中查看时,它仍然有轻微的高度差异.这是jsfiddle.任何帮助?
最佳答案
http://jsfiddle.net/H3HK8/22/
原文链接:https://www.f2er.com/css/427139.htmlbutton::-moz-focus-inner,.btn::-moz-focus-inner
{
border: 0;
padding: 0;
}
这修复了中间的,仍然在最终输入.
从这里http://www.aheadcreative.com/removing-unwanted-button-padding-in-firefox/
UPDATE
我怀疑最后的例子你是这个http://www.cssnewbie.com/input-button-line-height-bug/#.USzRd6Wcmzc的受害者
您可以在此示例http://jsfiddle.net/H3HK8/24/中看到行高无效,即使添加了!important.
And while trying to work around this rule,I discovered something that makes the situation a little more dire: browser-defined !important rules cannot be over-ruled by author-defined !important rules. This rule cannot be overruled by a CSS file,an inline style — anything.