javascriptfullpage.js

How to scroll normally (without snap) on a specific section in FullPage.js?


I am trying to build a website where I can use scroll snap for the first two sections and then scroll normally through a long section (300vh).

How can I accomplish this effect? I haven't found any place that explains it properly, so help is much needed.

I have tried using scrollOverflow: true; as mentioned in the FullPage.js documentation but it's not scrolling properly. It either gets stuck on the long section or doesn't scroll at all inside this section.

EDIT: Found the answer! There is a CSS file link that includes styles for fullpage.js, and after including it, everything will work fine. Here is the CodePen.

https://codepen.io/cftyftyj/pen/ExqjJee

here is the css link: https://cdn.jsdelivr.net/npm/fullpage.js@4.0.29/dist/fullpage.min.css


Solution

  • You are missing the fullpage.css file. Make sure to include it on the head of your page.

    Read more on the fullpage.js docs: https://alvarotrigo.com/fullPage/docs/#including-files

    You can find a full example on the fullPage.js example page: https://alvarotrigo.com/fullPage/examples/scrolling.html

    See the source code.