gpt4 book ai didi

具有固定高度的 jQuery slimScroll 滚动条

转载 作者:行者123 更新时间:2023-12-01 06:48:03 28 4
gpt4 key购买 nike

我正在使用 rochal 的 jQuery 插件 slimScroll显示自定义的滚动条。有没有办法使滚动条的高度固定,而不是自动生成?我认为必须生成 wheelStep 值,但不知道要更改什么。所以,问题是如何制作固定大小的滚动条。

如果这是不可能的,我也可以使用另一个插件。

最佳答案

这是可能的!为此,请执行以下操作:

之后:

// sets border radius of the rail
railBorderRadius : '7px'

在“7px”后面添加逗号:

// Use a fixed height for the scroll bar
useFixedHeight : true,

// the fixed height of the scroll bar
fixedHeight : 50

替换:

barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);

与:

if( o.useFixedHeight )
barHeight = o.fixedHeight;
else
barHeight = Math.max((me.outerHeight() / me[0].scrollHeight) * me.outerHeight(), minBarHeight);

关于具有固定高度的 jQuery slimScroll 滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20351979/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com