github源码浏览器过渡是如何完成的?
对于那些不知道我在说什么的人: https://github.com/ThePixelDeveloper/pixel -pagination
当您单击目录或文件时,github 会将内容向左滑动以显示新内容。我知道内容的加载是通过 pjax 完成的,我把这部分写下来了,但真的很困难随着过渡。问题是新内容被加载到我正在移动的容器中,因此它会消失在屏幕边缘,并且不会等待任何动画完成。
我的问题是:如何将新的 pjax 内容加载到新容器中?弄清楚之后,我需要做的就是在内容加载后将整个容器向左滑动以显示它。
For those who don't know what I'm talking about: https://github.com/ThePixelDeveloper/pixel-pagination
When you click on a directory or file github slides the content left to reveal the new content. I understand the loading of the content is done with pjax and I got this part down, but really struggle with the transition. The problem is the new content is loaded into the container I'm moving and so it vanishes off the edge of the screen and doesn't wait for any animations to complete.
My question is: How do I load new pjax content into a new container? After that's figured out all I would need to do is slide the whole container left once the content has loaded to reveal it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是 HTML5,他们在博客上讨论了这一点: https://github.com/blog/ 760-树-滑块
It's HTML5, they talk about this on their blog : https://github.com/blog/760-the-tree-slider
github 博客链接显示了“历史”方法,但没有显示他们如何进行滑动。大约 9 个月前,我必须创建一个左右滑块,最后得到了这个(那里有一个 jsfiddle 链接)...
具有动态上一个/下一个内容的 jQuery 滑块的最佳方法?
...如果有人有更好的 ajax 滑动方法,我会很想知道!
The github blog link shows the 'history' method, but not how they do the sliding. About 9 months ago I had to create a left-right slider, and ended up with this (there's a jsfiddle link in there) ...
best approach for jQuery slider with dynamic prev/next content?
... If anyone has a better approach to ajax sliding, I'd love to know it!