horizontal scrollbars with slimscroll

假如想象 提交于 2021-01-27 05:35:12

问题


I use slimscroll for my scrolling needs and it works great. Now I have need for horizontal scrolling. A quick google search gives me some results to references in the github source code and some issues which indicates that that horizontal scroll support has been added but nowhere I can I find an example. I've looked in the javascript file expecting to find a flag to switch from vertical to horizontal. Helas nothing so obvious. So my question is it possible if yes, how? An example would be greatly appreciated.


回答1:


The latest version of slimscroll is 1.3.1 (from github repository) and it does not support horizontal scrollbar. Try jQuery Scrollbar or any scrollbar that supports horizontal scrolling from this scrollbar comparison table.




回答2:


Now you can atualize your plug-in on the SlimScroll git repository, and just use the code below to instance your slimScroll

$('#testDiv').slimscroll({
    height: 150,
    width: 300,
    axis: 'both'
});



回答3:


Slimscroll with both axes examples using Bootstrap 4.

Click here to see the online working examples.




回答4:


I implemented ngSlimscroll, the rewritten version of the original slimscroll in AngularJS. It also supports horizontal scrolling. See the demo for example.




回答5:


Did you try adding this code?

$(".content").mCustomScrollbar({
    axis:"x" // horizontal scrollbar
});

$(".content").mCustomScrollbar({
    axis:"yx" // vertical and horizontal scrollbar
});


来源:https://stackoverflow.com/questions/24571449/horizontal-scrollbars-with-slimscroll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!