如何使用 joehewitt 滚动性?

发布于 2024-11-18 00:47:15 字数 194 浏览 5 评论 0原文

任何人都可以帮我实现 joehewitt 的滚动性插件吗?(https://github.com/joehewitt/scrollability.git ) 我正在尝试开发一个移动网络应用程序!

提前致谢!

Can anyone help me out in implementing joehewitt's scrollability plugin.(https://github.com/joehewitt/scrollability.git)
I am trying to develop a mobile web app!

Thanks in advance!

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

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

发布评论

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

评论(2

念﹏祤嫣 2024-11-25 00:47:15

没错,

1)包含 javascript 文件和 css 文件(位于静态文件夹中)

2)前往 http://scrollability。 com/
并按照结构创建两个 div:

<div id="overflow">
  <div id="scrollysection">
  </div>
</div>

使用以下 CSS

#overflow
    overflow:hidden
    position:absolute
    top:0px
    left:0px
    width:100%
    height:100%

#scrollysection
position:absolute
top:0px
left:0px

3)然后您需要在此处应用修复: https://github.com/joehewitt/scrollability/issues/29

要运行代码,只需注释掉或删除所有导出
东西(第 77-84 行)。然后在第 94 行提到 require 的地方,只是
从准备好的函数中取出两行代码并注释
准备好函数了。

这就是我所做的并且有效。

Right so,

1)Include the javascript file and the css file (its in the static folder)

2) Head to http://scrollability.com/
and following the structure create the two divs:

<div id="overflow">
  <div id="scrollysection">
  </div>
</div>

With the following CSS

#overflow
    overflow:hidden
    position:absolute
    top:0px
    left:0px
    width:100%
    height:100%

#scrollysection
position:absolute
top:0px
left:0px

3)Then you need to apply the fix here: https://github.com/joehewitt/scrollability/issues/29

To get the code running just comment out or remove all of the exports
stuff (lines 77-84). Then on line 94 where require is mentioned, just
pull the two lines of code out of that ready function and comment the
ready function out.

Thats what I did and it worked.

镜花水月 2024-11-25 00:47:15

看一下源代码: http://www.uponahill.com/ 它是由 Joe 完成的Hewitt 并使用可滚动性。

Have a look at the source code of: http://www.uponahill.com/ It is done by Joe Hewitt and uses scrollability.

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