jscrollpane 中的滚动条高度(jquery)

发布于 2024-11-11 15:32:25 字数 374 浏览 3 评论 0原文

我现在已经花了几个小时尝试调整 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青瓷清茶倾城歌 2024-11-18 15:32:25

看看这个演示,您似乎需要在滚动条中添加“caps”。

因此,使用该页面中的示例,类似

.jspVerticalBar .jspCap
{
    display: block;
    height: 20px;
}

在示例中,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,

.jspVerticalBar .jspCap
{
    display: block;
    height: 20px;
}

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文