jscrollpane 中的滚动条高度(jquery)
我现在已经花了几个小时尝试调整 .jspVerticalBar 的高度。看来默认情况下将栏的高度设置为窗格高度的 100%。
有谁知道在哪里设置这个?我不是在谈论可拖动部分,而是整个栏。
例如
目前是这样的:
:up | | | | | :向下,
但我想让它变小。
:向上 | | | :
不幸的是,我没有要粘贴的代码,因为我不知道要粘贴什么代码:) 但如果有人熟悉的话,lib就在这里 https://github.com/vitch/jScrollPane
提前致谢
I've been messing around for hours now trying to adjust the height of the .jspVerticalBar. it appears that default is setting the height of the bar to 100% of the panes height.
does anyone know where to set this? i'm not talking about the draggable portion, but the entire bar.
for example
currently it's like this:
:up
|
|
|
|
|
:down
but i want to make it smaller.
:up
|
|
|
:down
unfortunately i have no code to paste because i don't know what code TO paste :)
but the lib is here, if anyone is familiar
https://github.com/vitch/jScrollPane
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个演示,您似乎需要在滚动条中添加“caps”。
因此,使用该页面中的示例,类似
在示例中,
showArrows:true;
也被添加到 jSrollPane 的初始化中,但没有提及是否需要这样做。 (参见更新)它似乎没有提到如何在顶部添加与底部不同大小的“帽子”,我猜这意味着滚动条将始终居中于内容,
但我只是快速浏览了一下,所以可能有办法做到这一点。 (参见更新)
更新:
感谢 vitch 的评论。显然
showArrows:true
不是必需的,除了.jspCap
之外,您还有.jspCapTop
、.jspCapBottom
、.jspCapLeft
和.jspCapRight
分别修改大写字母。请注意,我没有使用过 jScrollPane,并且它未经测试,但希望它可能会有所帮助。
Looking at this demo, it seems you need to add "caps" to your scrollbar.
So using the example from that page, something like,
In the example,
showArrows:true;
is also added to the initialisation of jSrollPane, it's not mentioned whether this is required or not though. (See update)It doesn't seem to mention how you can add a different sized "cap" to the top than you do the bottom though, which I guess means the scrollbar will always be centred on the content,
but I only had a quick look so there may be a way to do this. (See Update)
Update:
Thanks to vitch in his comment. Apparently
showArrows:true
is not required, and as well as.jspCap
you have.jspCapTop
,.jspCapBottom
,.jspCapLeft
, and,.jspCapRight
to modify the caps individually.Pleas note, I haven't used jScrollPane and this is untested, but hopefully it may be helpful.