jScrollPane:删除滚动条装订线?
我希望将滚动条放置在内容上方,而不是在其旁边强制放置一个装订线。
在附图中,您可以看到它当前对红色滚动条的作用...它创建了一个垂直装订线,将内容推到一边。
但我想做的是底部的内容......将滚动条定位在内容上方。
我尝试过绝对定位 .jspVerticalBar
但我无法摆脱排水沟。
编辑:这是问题的 jsFiddle:http://jsfiddle.net/8Mebt/3/ -- 正如你所看到的,最右边仍然有一个间隙,项目的“选定”状态并没有像我想要的那样一直延伸。
I'd like to have the scrollbar place over the content instead of forcing a gutter beside it.
In the attached image you can see what it currently does with the red scroll bar...it creates a vertical gutter that pushes the content to the side.
But what I want to do is what's on the bottom...have the scrollbar positioned over the content.
I've tried absolutely positioning .jspVerticalBar
but I haven't been able to get rid of the gutter.
EDIT: Here's the jsFiddle of the problem: http://jsfiddle.net/8Mebt/3/ -- As you can see, there's still a gap on the far right and the "selected" state of the item doesn't extend all the way over as I want it to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
.jspVerticalBar
已经绝对定位。将其right
属性设置为您想要的,并设置为使装订线的背景(在 jscrollpane 中称为轨道)透明。
演示位于 http://jsfiddle.net/gaby/DsDQP/
更新
评论后( 包括a jsfiddle)这是我的解决方法。
将
verticalGutter
设置设置为0
并重新计算 jspPane 的宽度以包含 jspTrack 宽度。演示位于 < a href="http://jsfiddle.net/gaby/DsDQP/8/" rel="nofollow">http://jsfiddle.net/gaby/DsDQP/8/
每次重新初始化后都需要调用重新计算..
The
.jspVerticalBar
is already absolutely positioned. Set itsright
property to what you want, and also setso that the background of the gutter (track as is it called in jscrollpane) is transparent..
Demo at http://jsfiddle.net/gaby/DsDQP/
Update
After the comments (including a jsfiddle) here is my workaround..
Set the
verticalGutter
setting to0
and recalculate the width of the jspPane to include the jspTrack width..demo at http://jsfiddle.net/gaby/DsDQP/8/
The recalculation needs to be called after each reinitialization..
您可以在 jScrollPane 初始化时设置一个负的
verticalGutter
值,它就会完成任务,无需其他操作。http://jsfiddle.net/DsDQP/50/
You can put a negative
verticalGutter
value at the jScrollPane initialization and it will do the trick, with no additional actions required.http://jsfiddle.net/DsDQP/50/
您可以尝试这样做......
这样,每次循环时都会更新滚动功能......因此 ScrollBar 的长度将根据子容器中数据存储的大小而增加或缩小。
希望有帮助......
埃贝斯特
You can try to do it this way.....
With this, the scrolling capabilities are renewed every time a loop is made....hence the ScrollBar's length will grow or shrink depending on the size of data store in the child container.
Hope that helps....
Ebest