![](/img/trans.png)
[英]on scroll to each paragraph increase the size and after when scroll is not in the paragraph decrease the size with jquery
[英]how to increase the size of scroll track in jquery jscrollpane
我在jScrollpane中更改了滚动条的大小
$(function()
{
$('.scroll-pane').jScrollPane({
verticalDragMinHeight: 30,
verticalDragMaxHeight: 32,
horizontalDragMinWidth: 40,
horizontalDragMaxWidth: 40
});
});
但是我无法更改它具有的曲目的大小。
PFB图像
尝试使用以下更新的CSS。
.jspVerticalBar
{
position: absolute;
top: 0;
right: 0;
width: 27px;
height: 100%;
}
有几种方法可以执行此操作。您需要设置JScrollBar组件的首选大小。 使用您的初始方法,您可以执行以下操作:
scrollpane.getVerticalScrollBar().setPreferredSize(
new Dimension(width, Integer.MAX_VALUE));
scrollpane.getHorizontalScrollBar().setPreferredSize(
new Dimension(Integer.MAX_VALUE, width));
赞誉这篇文章LINK
您也可以使用CSS来做到这一点:
::-webkit-scrollbar{
width: 10px;
height: 10px;
padding-top: 50px;
}
这是有关如何使用jScrollpane的另一资源
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.