mCustomScrollbar 有一个奇怪的问题 - 类似的问题在这里:
stubborn prolem with popular custom scrollbar
在您调整窗口大小或按下 F12 之前,滚动条不会显示(在 IE9 和 FF 上测试过 - 所以 Developer 和 Firebug)。一旦你这样做,代码就会开始。元素最初是隐藏的,并使用 .show() 或 .fadeIn() 显示
CSS:
.info-text {
width: 230px;
height: 170px;
overflow: hidden;
display: block;
}
HTML:
<p class = "info-text">
Lorem...
</p>
JS:
$(".info-text").mCustomScrollbar();
JS 保存在 $(window).load(function(){...
最佳答案
您可以在初始时尝试使用该属性
advanced:{
updateOnContentResize:true,
updateOnBrowserResize:true
}
所以你应该有类似的东西:
$(".info-text").mCustomScrollbar({
advanced:{
updateOnContentResize:true,
updateOnBrowserResize:true
}
});
关于jquery - mCustomScrollbar - 滚动条只出现在 F12 按下时(开发工具/Firebug)而不是隐藏元素/div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16688504/