有没有办法让 jQuery Tiny Scrollbar 相对于屏幕尺寸具有 100% 的高度?
我正在用头撞墙。我正在研究一个全屏设计。到处搜索,尝试找到一种方法使 Tiny Scrollbar 与 此设计。我有一个侧面板滑块工作得很好,我希望滚动条填充屏幕的垂直右侧。我那里也有滚动条。我目前将“视口”设置为高度:600px;如果我将高度设置为 100% 或使用最小高度,滚动条内的所有内容都会消失。我希望滚动条能够根据屏幕尺寸调整大小。
任何建议都会让我开心!
提前致谢。
I am banging my head against the wall. I have a full screen design that I am working on. Searched high and low to try and find a way to make Tiny Scrollbar work with this design. I have a side panel slider working just fine and I want the scroller to fill the the vertical right side of the screen. I have the scroller in there as well. I currently have the "viewport" set to height:600px;, if I set the height to 100% or use a min height all content inside the scroller disappears. I want the scroller to resize with the screen size.
Any suggestions would make my year!
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您仍然需要它:
对我有用,但需要一个在调整窗口大小时更新高度的函数。
if you still need it:
Works for me , but is needed a function to update the height when window is resized.
当使用以下代码调整浏览器窗口大小时,我设法使用 .viewport resize 执行上述操作:
不过,我不知道如何正确调整滚动条句柄的大小。
I managed to do the above with .viewport resize when browser window is resized with this code:
I have no idea how to resize the scrollbar handle properly, though.
我想我明白了:
注意:我使用 heightscroll-48 因为我有一个标题要固定在滚动上方。如果你真的想要完整的 100% 高度,只需使用 heightscroll 并删除“-48”。
I think I got it:
Note: I used heightscroll-48 because I have a header I want fixed above the scroll. If you really want full 100% height just use heightscroll and delete "-48".