“Sticky” Scroll Positions

2019-06-28 03:02发布

问题:

Is there any way to frame content based on scroll position; Whenever a user scrolls past a certain marker point the page is pushed (locked) to a certain position (slide) guiding the user to view the content on that slide (the page is based on https://github.com/richardshepherd/Parallax-Scrolling/). There would be multiple marker points so the user is guided to view the content on the slides.

回答1:

yes. There is a nifty little jquery plugin that handles this: https://github.com/bigspotteddog/ScrollToFixed

or you can reference this previous post dealing with the same subject matter: Stopping fixed position scrolling at a certain point?