Fullpage Js 让我的导航手机停止工作

Fullpagejs makes my navigation mobile stop working

我正在使用 fullpagejs 和 generatepress。

运行fullpagejs的页面有一个导航菜单。

在移动端,当导航菜单打开时,我无法在菜单中向下移动,touchmove 不起作用。

如果我关闭菜单,touchmove 会在 fulpagejs 之间导航

那是我的 fullpagejs 配置

new fullpage("#fullpage", {
    //options here
    autoScrolling: true,
    scrollOverflow: true,
    scrollingSpeed: 700,
    css3: true,
    easingcss3:  "ease",
    anchors: [
      "project",
      "project",
      "project",
      "project",
      "project",
      "project",
      "project",
      "project",
    ],
  });

  window.addEventListener("resize", function (event) {
    fullpage_api.reBuild();
  });

您可能想在 fullPage.js 提供的 normalScrollElements 选项上添加您的菜单。

来自the fullpage.js documentation

normalScrollElements: (default null) Demo If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the Javascript selectors for those elements. (For example: normalScrollElements: '#element1, .element2'). This option should not be applied to any section/slide element itself.