当鼠标在某个 div 内时禁用 fullpage.js

disable fullpage.js when mouse inside a certain div

基本上我使用的 WordPress 主题是使用 fullpage.js .

现在,我在页面内手动创建了一个滚动框 div。 当我的鼠标在该滚动框内时,如何禁用整页滚动 div 以使其正常工作?

我找到了这个 但我不知道如何将它正确设置为 .scroll-box

.scroll-box {
    width: auto;
    height: 150px;
    overflow: auto;
    padding: 0 5%;
}
<div class="scroll-box">
<p style="font-weight: bold;">Industry:
Business, Finance</p>
<p style="font-weight: bold;">Objective:
User acquisition, User engagement</p>
<p style="font-weight: bold;">Services provided:
Performance Marketing, Design</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque et odio purus. In volutpat, nisi ac malesuada volutpat, nisl magna vehicula leo, et posuere nunc nunc in nisl. Etiam facilisis convallis luctus. Aliquam nec luctus libero. Ut tincidunt ut massa sed malesuada. Aenean dolor orci, laoreet a imperdiet id, maximus id elit. Ut consequat tortor ac dui sollicitudin, non lacinia ante feugiat. Integer in orci sem. Nam tempus libero in enim efficitur dapibus. Nunc consequat lacinia libero quis convallis. Nunc vulputate interdum diam eget cursus.

Maecenas purus nisi, sodales quis turpis nec, luctus fringilla leo. Integer dapibus interdum risus nec tincidunt. Morbi pretium sit amet mi quis ullamcorper. Integer tempus hendrerit enim, aliquet finibus dolor molestie sed. Donec ac eleifend diam, at gravida eros. Mauris malesuada dolor at magna facilisis finibus. Vivamus fringilla nisi non sapien vestibulum scelerisque in vel libero. Sed mattis rhoncus pulvinar. Suspendisse quam urna, hendrerit quis libero quis, maximus laoreet sem. Maecenas vestibulum massa in mattis rutrum. Proin eu finibus nibh. Mauris quis nibh sit amet nibh posuere pulvinar quis ac massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>

</div>

当您有权访问调用 new fullpage() 的位置时,您可以使用 CSS 选择器语法:

  const fullpage = new fullpage('#fullpagediv', { normalScrollElements: '.scroll-box' })

希望对您有所帮助。