html - 在 Firefox 上,溢出 : hidden works, 但滚动条和空格仍然存在

标签 html css firefox

我知道 Firefox 与 overflow: hidden; 有点不一致;我读了相关的故事。所以在溢出之上:隐藏;属性,我还添加了 clip-path: inset(0 0 0 0);甚至 -moz-overflow: hidden;.结果,溢出确实被隐藏了,但是在溢出的地方留下了一大片空白。如何摆脱这个?

这是我的 CSS:

    .site-footer {
        position: relative;
        display: table;
        -moz-overflow: hidden;
        overflow: hidden;
        clip-path: inset(0 0 0 0);
        background-color: #10142F;
        width: 100%;
        padding-top: 30px;
    }

    .site-footer::before{
        content: "";
        width: 350%;
        max-width: 350%;
        display: table-cell;
        height: 120%;
        left: -125%;
        top: -10%;
        position: absolute;
        z-index: 0;
        background-image: url('media/backgrounds/blue-planet-4-1700-2.jpg');
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        -webkit-animation: spin 160s linear reverse infinite;
        animation: spin 160s linear reverse infinite;
    }

有问题的元素是旋转背景伪元素,它比父元素大(故意),但我应该可以用 css 将其切断。

这是网站: www.satya-ame-art.com

此问题出现在本网站页脚的最后。在 Chrome 和 Safari 上,它工作正常......

非常感谢!

最佳答案

给overflow: hidden给页面元素

#page {
  overflow: hidden;
}

关于html - 在 Firefox 上,溢出 : hidden works, 但滚动条和空格仍然存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58691532/

相关文章:

当我快速鼠标移动时,jQuery 悬停会卡住

javascript - Firefox setTimeout(func, ms) 发送默认参数给回调

html - 如何在 Firefox 代码检查器中搜索标签并排除简单文本结果?

javascript - 使用 JavaScript 更新 div 内容

html - 更改颜色字体图标中的问题 "svg file"

css - 使用 zurb 基础模板在列折叠时如何更改宽度

javascript - 如何在我的 wordpress 导航菜单上选择两类具有多类的 <li>?

python - 将 HTML 插入 Flask 的正确方法

javascript - jquery mobile 将我的屏幕大小设置为 100%

php - Firefox 中的 JQuery SYNC Ajax 调用错误