[英]scrollOverflow / slimScroll not working properly in fullPage.js
This is the sequel of this thread. 这是这个帖子的续集。
On one page of the website I'm building for a client, both fullpage navigation and scrolloverflow/slimscroll work fine. 在我为客户构建的网站的一个页面上,全页导航和scrolloverflow / slimscroll都可以正常工作。
On another page, fullpage nav works but the overflow is not scrolling. 在另一页上,fullpage导航工作,但溢出不滚动。 Looks like the two divs with the class .slimScrollDiv
and .scrollable
are not being created as expected. 看起来像.slimScrollDiv
和.scrollable
类的两个div没有按预期创建。 Here's the jsfiddle ; 这是jsfiddle ; the scrollOverflow
is set to true
yet the overflow of the second section does not scroll. scrollOverflow
设置为true
但第二部分的溢出不会滚动。
$.fn.fullpage({
scrollOverflow: true
});
You are having troubles because the class .infotext
wrapping your table is defined with position:absolute
. 您遇到了麻烦,因为包装表的类.infotext
定义为position:absolute
。 This way the plugin can not detect the height of the section content and therefore I doesn't realize it has to create the scrollbar. 这样插件无法检测到节内容的高度,因此我没有意识到它必须创建滚动条。
Use position:relative
instead and the problem will be solved: 使用position:relative
来解决问题:
Using an absolute positioned element doesn't make much sense as it will be relative to the section as if you were using a relative positioned one. 使用绝对定位元素没有太大意义,因为它将相对于该部分,就像您使用相对定位元素一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.