使用CSS制作和看起来一样

我想制作< button>和< a>看起来一样.我发现了一个类似的帖子,建议添加

Box-sizing: content-Box;
-webkit-Box-sizing: content-Box;
-moz-Box-sizing: content-Box;

但是,在Firefox中查看时,它仍然有轻微的高度差异.这是jsfiddle.任何帮助?

最佳答案
http://jsfiddle.net/H3HK8/22/

button::-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.

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效