Scrollify section scroll with overflow

☆樱花仙子☆ 提交于 2019-12-06 08:27:13

问题


I am trying to use the script Scrollify (https://github.com/lukehaas/Scrollify) but I have sections that are longer than the user's screen, which means you first have to scroll down to see that contents' content.

Scrollify, however, doesn't let this happen and will just immediately scroll to the new section.

Is there a way to modify Scrollify and/or use another script that will accomplice what I would like it to do?


回答1:


Scrollify has recently received a number of updates that resolve the issues you've been having.

Scrollify now has additional options, methods and callbacks and it now works great with trackpads, Apple Magic mice and kinetic scrolling.




回答2:


You can easily achieve that by using fullPage.js instead. If you want to keep the scroll bar as in scrollify, just use the option scrollBar:true for that as in this example.

Using the option scrollOverflow:true you can overcome your problem as you can see in this example.

From fullPage.js documentation:

scrollOverflow: (default false) defines whether or not to create a scroll for the section in case its content is bigger than the height of it. When set to true, your content will be wrapped by the plugin. Consider using delegation or load your other scripts in the afterRender callback. In case of setting it to true, it requires the vendor plugin jquery.slimscroll.min and it should be loaded before the fullPage.js plugin.

Additionally, fullPage.js:

  • Provides much more options, methods and callbacks.
  • when possible, it uses css3 transformation which perform better in tablets and mobile phones.
  • Solves problems with Apple laptops trackpads, Apple magic mouses and any kinetic scrolling.
  • Provides a set of extensions


来源:https://stackoverflow.com/questions/28123925/scrollify-section-scroll-with-overflow

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!