我将“fp-auto-height”类添加到我的 fullpage.js 页面的顶部,使其小于全屏。现在,向下滚动后,我无法再向上滚动。
我调查了一下,意识到这是因为滚动机制将部分的底部对齐到视口(viewport)的底部。由于第一部分上方没有任何内容,因此无法将其底部捕捉到视口(viewport)底部。
如何让它将部分的顶部对齐到视口(viewport)的顶部(而不是从下到下)
谢谢!
最佳答案
I added the "fp-auto-height" class to the top section in my fullpage.js page
第一部分有一个自动高度是没有意义的。
It is important to realise that it doesn't make sense to have all of your sections using this feature. If there is more than one section in the initial load of the site, the plugin won't scroll at all to see the next one as it will be already in the viewport.
基本上,插件不应该按照您使用它的方式使用。 引入自动高度选项作为处理页脚和网站其他部分的一种方式。不是你的第一部分。
关于jquery - fullpage.js 将视口(viewport)顶部捕捉到部分顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33499491/