我在 Firefox 中遇到负边距问题。我的负边距在 Chrome 中有效,但在 Firefox 中无效。
.search-bar {
height: 108px;
position: relative;
margin-top: -10px;
}
最佳答案
简单的解决方案:
.search-bar {
height: 98px;
position: relative;
top: -10px;
}
我替换了margin-top
与 top
具有相同的值,我减少了height
与旧margin-top
值,而且工作起来很有魅力。
关于css - Firefox 中负边距值的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21471531/