我怎样才能把这个例子变成一个“2D”?使用 HTML5 幻灯片网格?
我想知道是否可以在 2D 中采用 这种 HTML5 技术,例如我们可以使用箭头键可在 3 x 3 幻灯片网格中导航。
如果有,能否指出来源?
I am wondering if it is possible to adapt this HTML5 technology in 2D, such that e.g. we could use the arrow keys to navigate a 3 by 3 slides grid.
If so, could you indicate a source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很久以前写的一个插件:
http://flesler.blogspot.com/2007/10/jqueryscrollto.html
它允许你用 JavaScript 做你想做的事:
http://demos.flesler.com/jquery/scrollTo/
这是一个简要概述您可以使用此插件做什么:
请注意,您的容器需要通过 CSS 设置
overflow:hidden
和尺寸(当然,如果您愿意,也可以通过 JS 进行设置)。您可以在插件页面找到所有要求。There is a plugin written long time ago:
http://flesler.blogspot.com/2007/10/jqueryscrollto.html
that allows you to do what you desire with JavaScript:
http://demos.flesler.com/jquery/scrollTo/
This is a brief outline of what you could do with this plugin:
Note that your container will need to have
overflow:hidden
and dimensions set on it from CSS (or of course you can do that from JS if you want to). You can find all requirements in plugins page.谷歌地图长期以来一直在这样做。谷歌地图实际上是巨大的网格,远远超出了你的屏幕所能处理的范围。你得到的只是足够的,这样你就不会碰到丢失的东西。当您完成拖动(而不是单击右/左/上/下箭头)时,它会通过 AJAX 检索更多“图块/幻灯片/图像”以填充已移动的网格部分。
Google maps has been doing this for a long time. Google maps are actually huge grids that extend way beyond what your screen could handle. You get just enough so that you don't bump into the missing ones. When you're done dragging (rather than clicking right/left/up/down arrows) it retrieves more "tiles/slides/images" via AJAX to fill in the part of the grid that was moved.