问题
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:
Chrome ui:
CSS code:
.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;
}
In chrome margin-top: -115px is working but in Firefox that going top but margin-top:-15px; it's working firefox.
回答1:
Use this snippet to reset browser defaults
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
来源:https://stackoverflow.com/questions/53993091/different-margin-size-for-firefox-and-chrome