How to create the drag and slide effect from this website?

六月ゝ 毕业季﹏ 提交于 2019-12-20 14:06:02

问题


If you drag and release quickly from the horizontal menu, the menu will auto slide for a distance. It seems to slide more the faster you drag and release. Source ->appear.dk

How do i achieve this effect? Has it got to do with some complex formulaes?


回答1:


This technique is called kinetic scrolling (you simulate kinetic energy). Since the dawn of the iphone this technique has been hyped, though it can be used on mobile devices with great benefit, I would refrain from using it inside a website (like all other sorts of scrolling)

However, here's an easy to use jquery plugin: Here you go




回答2:


Overscroll didn't work well for me on the iPad. Here are some more options:

  • iScroll
  • TouchScroll
  • jScrollTouch



回答3:


None of those jquery librarys listed above .. can compare to custom prototype code used in appear.dk The smoot



来源:https://stackoverflow.com/questions/2790308/how-to-create-the-drag-and-slide-effect-from-this-website

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