如何从该网站创建拖动和滑动效果?

发布于 2024-08-31 08:26:39 字数 154 浏览 1 评论 0原文

如果从水平菜单中快速拖动并释放,菜单将自动滑动一段距离。拖动和释放的速度越快,它似乎滑动得越多。来源 ->appear.dk

我如何实现这种效果?是不是和一些复杂的公式有关?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

世界如花海般美丽 2024-09-07 08:26:39

这种技术称为动能滚动(模拟动能)。自从 iPhone 诞生以来,这项技术就被大肆宣传,尽管它可以在移动设备上使用,带来很大的好处,但我不会在网站内使用它(就像所有其他类型的滚动一样)

但是,这里有一个易于使用的 jquery 插件:给你

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

夏の忆 2024-09-07 08:26:39

过度滚动在 iPad 上不太适合我。以下是更多选项:

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

爱她像谁 2024-09-07 08:26:39

上面列出的所有 jquery 库都无法与appear.dk中使用的自定义原型代码进行比较

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文