Firefox和Chrome填充之间的区别 [英] difference between Firefox and Chrome padding

查看:84
本文介绍了Firefox和Chrome填充之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

firefox和chrome在CSS中填充的方式有所不同。
在chrome中看起来正确的内容在Firefox中被额外填充。有办法解决吗?

there is a difference in how firefox and chrome render the padding in css. what appears correct in chrome is extra padded in firefox. is there a way to solve?

.button {
    font-family: helvetica, arial;
    font-size: 64px;
    width: 70px;
    height: 45px;
    font-weight: bold;
    padding: 0px;
    padding-top: 25px;
    background-color: #000;
    color: #fff;
    text-align: center;
    float: right;
    margin: 7px 10px 0 0;
}


推荐答案

如果您的.button是按钮这可能是mozilla内在关注点...尝试这个吗?

If your .button is a button this might be a mozilla inner focus thing... try this?

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

这篇关于Firefox和Chrome填充之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆