如何让jScrollPane符合padding
很难解释......但这是我画的图片:D
我正在使用找到的 jScrollPane < a href="http://jscrollpane.kelvinluck.com/" rel="nofollow noreferrer">这里!
当前滚动条忽略 div 的填充。但我需要滚动条以符合填充。我已经阅读了 css 文件并尝试阅读 js 但我无法弄清楚。
jScrollPane 是一个非常好的跨浏览器解决方案,但在我看来文档确实是垃圾!
如果有帮助的话,容器 div 的 css 是:
div#Side{
/* box-model */
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
/* structure */
position:absolute;
z-index: 2;
right:18px;
bottom:18px;
width:261px;
height:100%;
padding-top: 10px;
border-left: 1px Solid #EEE;
/* style */
background-color: #222;
}
Cheers Peoples,
Alex
Its hard to explain... but here's a picture I drew :D
I'm using the jScrollPane Found HERE!
The current scroll bar ignores the padding of the div. But I need the scroll bar to conform to the padding. I've read the css file and attempted to read the js but I can't figure it out.
the jScrollPane is a very good cross-browser solution but the documentation is truly rubbish in my opinion!
If its any help, the css for the container div is:
div#Side{
/* box-model */
box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
/* structure */
position:absolute;
z-index: 2;
right:18px;
bottom:18px;
width:261px;
height:100%;
padding-top: 10px;
border-left: 1px Solid #EEE;
/* style */
background-color: #222;
}
Cheers Peoples,
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题已经有很多年了,但如果其他人也有类似的问题(我有),那么这个解决方案可能会有所帮助。
jScrollPane 有一个“大写”功能,可让您在滚动条的末尾设置一个空格或间隙,以便它不会达到可滚动元素的完整高度(或宽度,取决于情况)。
在上述情况下,您可以在 CSS 中进行设置:
参考: http://jscrollpane.kelvinluck.com/ caps.html
This question is years old, but in case anyone else has a similar problem (I did), then this solution might help.
jScrollPane has a "caps" feature that lets you set a space or gap at the end of the scrollbar so that it doesn't reach the full height (or width, depending on the case) of your scrollable element.
In the case above, you would set this in the CSS:
Reference: http://jscrollpane.kelvinluck.com/caps.html