推特板效果滑动框架
当您访问此链接时 http://tweetboard.com/alpha/
您将在左侧看到一个推文标签。当您单击此推文标签时,另一个网站会加载到此面板/iframe 中。您能帮我理解这个功能是如何创建的吗?看来我应该能够使用标准 HTML 和 jQuery 创建这种效果。
如果您能为我指出生成此类 UI 的正确资源,那就太好了。
提前致谢。
When you visit this link
http://tweetboard.com/alpha/
you will see a Tweets label on the left. When you click this tweets label, another site loads inside this panel/iframe. Can you please help me understand how this feature is created? It seems that I should be able to create this effect using standard HTML and jQuery.
If you can point me to the right resources to generate this kind of UI, that will be great.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须做几件事:
3. 连接一个“切换”来关闭面板,这可以通过将上面的代码替换为以下代码来完成:
您可以使用 iframe,但据我所知,当页面完全加载到 iframe 中时,无法执行回调。如果您尝试编写一个插件来执行此操作,则可以将第一步替换为设置 iframe 的内容。
编辑:抱歉,如果任何代码块被搞乱,那么不会根据空格进行格式化或使用编辑器中的“代码”按钮。
You'll have to do a couple of things:
3. Wire up a 'toggle' to close the panel, this can be done by replacing the above code with something like:
You could use an iframe, but as far as I know, there is no way to perform a callback when the page is fully loaded in the iframe. If you're trying to write a plugin that does this, an replacing the first step with setting an iframe's content would be the way to go.
edit: sorry if any of the code blocks are messed up, SO isn't formatting according to whitespace or using the 'code' button in the editor.