【问题标题】:Bootstrap template not working correctly with custom scrollbar引导模板无法与自定义滚动条一起正常工作
【发布时间】:2016-05-20 10:44:59
【问题描述】:

我下载了一个带有固定侧边栏 (http://startbootstrap.com/template-overviews/simple-sidebar/) 的简单引导模板,并尝试在其中集成自定义滚动条 (http://manos.malihu.gr/jquery-custom-content-scroller/),但一旦插件运行

 $("#sidebar-wrapper").mCustomScrollbar()

 $("#sidebar-wrapper").mCustomScrollbar({theme: "minimal-dark"})

菜单变成黑屏。我创建了这个小提琴来展示这种行为https://jsfiddle.net/9qawf6r3/。这是另一个工作示例:http://jsfiddle.net/wuj2v604/

对此有什么想法吗?

【问题讨论】:

    标签: javascript html css twitter-bootstrap-3 mcustomscrollbar


    【解决方案1】:

    更改.mCustomScrollBox 类中的background-color 属性。

    它来自 jquery.mCustomScrollbar.min.css 。

    .mCustomScrollBox {
        direction: ltr;
        height: 100%;
        max-width: 100%;
        outline: 0 none;
        overflow: hidden;
        position: relative;
    }
    

    添加background-color:#FFF !important; 或您想要的任何颜色。

    编辑:也添加这个 css

    #mCSB_1_container{
      height:100%;
    }
    

    检查这个jsfiddle

    【讨论】:

    • 做到了,但没有改变。菜单内容仍然缺失,滚动条也缺失。
    • 谢谢@p2 现在我可以看到菜单了,虽然我不明白滚动条发生了什么。
    • @Leo : 如果你的问题得到解决,cn u upvote 并接受答案
    • 不,抱歉,尚未修复。我希望滚动工作,但事实并非如此。我现在只看到菜单,但看不到滚动条。
    猜你喜欢
    • 1970-01-01
    • 2017-04-16
    • 2015-06-04
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多