首页 文章

隐藏mozilla firefox上的滚动条

提问于
浏览
0

我正在制作一个Web应用程序,我似乎无法摆脱Mozilla Firefox菜单的滚动条 . 它适用于我测试的每个浏览器,除了firefox .

这是我用于卷轴的css,到目前为止在Chrome,IE,Edge和Opera中都有效,但在firefox中却没有 .

.main-sidebar{
        position:fixed
    }

    .bar{
        max-height: 400px; 
        overflow-y: scroll;
    }
    .bar::-webkit-scrollbar {
        display: none;
    }

    .bar {
        -ms-overflow-style: none; 
        overflow:hidden;
    }


    html {
        overflow: scroll;
        overflow-x: hidden;
    }
    ::-webkit-scrollbar {
        width: 0px;  /* remove scrollbar space */
        background: transparent;  /* optional: just make scrollbar invisible */
    }

.bar是div的类,我想隐藏滚动 . 菜单滚动很好,但它没有隐藏在Firefox上 . 有什么想法吗 ?

1 回答

  • 0

    在您的webkit-scrollbar上试试这个:

    ::-webkit-scrollbar { display: none; }
    

    它应该工作 .

相关问题