jquery - fullpage.js 将视口(viewport)顶部捕捉到部分顶部

标签 jquery html css fullpage.js

我将“fp-auto-height”类添加到我的 fullpage.js 页面的顶部,使其小于全屏。现在,向下滚动后,我无法再向上滚动。

我调查了一下,意识到这是因为滚动机制将部分的底部对齐到视口(viewport)的底部。由于第一部分上方没有任何内容,因此无法将其底部捕捉到视口(viewport)底部。

如何让它将部分的顶部对齐到视口(viewport)的顶部(而不是从下到下)

谢谢!

最佳答案

I added the "fp-auto-height" class to the top section in my fullpage.js page

第一部分有一个自动高度是没有意义的。

The documentation说:

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/

相关文章:

javascript - SmartyStreets jQuery.liveaddress插件,如何解除事件绑定(bind)

javascript - window.open 在 iPad Safari 上无法正常工作

javascript - 将图像纵横比保持在响应大小划分中

jquery ajaxstart ajaxstop 显示隐藏

jquery - 有没有类似于:checked for input type text?的东西

javascript - JS : fullpage. 不同部分之间的 js moveTo()

css - 将 div 对齐到底部

html - 下拉菜单未使用 Z-Index 覆盖下方的 div 菜单

jquery - Bootstrap twitter Active Navigation Bar - 使用 JQuery 更改类名

javascript - 我的时钟不工作了。为什么 InnerHTML 不更新?