【发布时间】:2013-09-19 12:15:21
【问题描述】:
我正在使用custom scrollbar,添加一个滚动条非常容易,但是如果我想添加第二个,他们两次使用一个 mCustomScrollbar.css 我不知道如何更改第二个 div。我正在查看demo custom scrollbar 上的代码,但这只是失败了。
JQUERY
(function($){
$(window).load(function(){
$(".suwak").mCustomScrollbar();
});
})(jQuery);
HTML
<link href="scrollbar/jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
<script src="scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
<div class="suwak"> content with first scrollbar </div>
<div class="suwak2"> content with second scrollbar </div>
一些简单的 CSS
.suwak{
position:relative;
width:475px;
height:300px;
background-color: #000e1b;
color: white;
overflow:hidden
margin-top:160px;
margin-left: 15px;
}
【问题讨论】:
标签: javascript jquery html css scrollbar