如何在智能手机上 "disable" FullPage 并将部分显示为长页面?

How to "disable" FullPage on smartphones and display sections as a long page?

我正在使用 FullPage JS 来显示几个部分。在桌面上,它完美运行。

但是,有些部分的内容相当多。在智能手机上,涵盖了这些部分的部分内容。换句话说,当我滚动时,我只能看到这些部分的部分内容(我已经使用媒体查询来减少智能手机上的内容显示,但这些部分的内容确实比全屏在智能手机上显示的内容要多) .

我需要常用的 FullPage JS 在桌面上为我工作。但是,我可以在智能手机上禁用全屏显示,而只是在智能手机上将部分列表显示为长页面吗?以前有人这样做过吗?

fullpage.js 为其提供选项,例如 responsiveWidthresponsiveHeight 将关闭在给定像素值下的自动滚动。

将这些与 class fp-auto-height-responsive 结合起来,你会得到你想要的。

这一切都很详细in the docs

Responsive auto height sections A responsive auto height can be applied by using the class fp-auto-height-responsive. This way sections will be full height until the responsive mode gets fired.

responsiveWidth: (default 0) A normal scroll (autoScrolling:false) will be used under the defined width in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's width is less than 900 the plugin will scroll like a normal site.

responsiveHeight: (default 0) A normal scroll (autoScrolling:false) will be used under the defined height in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's height is less than 900 the plugin will scroll like a normal site.