0

我已经下载了一个带有固定侧边栏的简单引导模板(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/

对此有任何想法吗?

4

1 回答 1

0

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

它来自 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

于 2016-05-20T10:52:43.183 回答