Firefox和Chrome的保证金大小不同 [英] Different margin size for Firefox and Chrome

查看:33
本文介绍了Firefox和Chrome的保证金大小不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Firefox和Chrome的页边距大小不同,我附加了两个浏览器图像,我的CSS代码请提供反馈信息以解决该问题.

The Firefox and Chrome margin-top size are different i attached the two browser images and my css code please give a feedback how to fix that issues.

Firefox ui:

Firefox ui:

Chrome用户界面:

Chrome ui:

CSS代码:

.toparea-right .user-img > img {
    border-radius: 50%;
    display: inline-block;
    -webkit-transform: scale(0.90);
    -moz-transform: scale(0.90);
    transform: scale(0.90);
    vertical-align: inherit;
    float: right;
    margin-right: -395px;
    margin-top: -115px;
    width: 45px;
}

在Chrome浏览器中,margin-top:-115px起作用,但是在Firefox中,它处于顶端,但margin-top:-15px;它正在使用Firefox.

In chrome margin-top: -115px is working but in Firefox that going top but margin-top:-15px; it's working firefox.

推荐答案

使用此代码段重置浏览器默认值

Use this snippet to reset browser defaults

*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

这篇关于Firefox和Chrome的保证金大小不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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