在Chrome上出现溢出,但在Firefox上没有溢出

时间:2018-09-09 18:35:51

标签: html css css3 google-chrome firefox

我当时在firefox上开发了一个站点,现在它对firefox上的所有设备都非常适用,但是在移动chrome上却非常糟糕。我添加了亮色和红色边框来帮助调试,但我不明白是什么原因造成的。

这种情况出现在响应模式和物理设备上。

通过https://autoprefixer.github.io/

在我的CSS中添加前缀

这是相关的CSS:

* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: 1px solid red;
}

html, body {
    overflow: hidden !important;
}

html {
    background: green !important;
    max-height: 100vh !important;
    max-width: 100vw !important;
}

body {
    background: white;
    overflow: hidden;
    height: 100vh;
}

这是在chrome上的外观 Chrome

以及在Firefox上的外观。 Firefox

0 个答案:

没有答案
相关问题