Facebook 如何将该工具栏保留在页面底部?
I like how Facebook keeps that toolbar on the bottom of the page.
Does that require cross-browser ninja skills?
Their JavaScript/CSS files are huge so I am having a hard time narrowing down the implementation (for learning purposes).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用 CSS 实现效果。
You can achieve the effect with CSS.
这是一个基本示例。 不,它不需要跨浏览器的忍者技能。 =)
Here's a basic example. No, it doesn't require cross-browser ninja skillz. =)
最好的方法是安装 Firebug 并看看他们是如何做到的。 当我在网络上看到有趣的东西时,Firebug 是分析其 HTML 结构、附加 CSS 的最佳方法,您甚至可以直接修改 CSS/HTML 结构以查看它如何变化。 您在网站上看到的所有内容都可以轻松阅读。 请记住,源代码(HTML、CSS、JavaScript)是随之交付的:)
The best is to install Firebug and see how they did it. When I see interesting things on the web, Firebug is the best way to analyze it's HTML structure, attached CSS and you can even directly modify the CSS/HTML structure to see how it changes. Everything you see on a website can be simply read. Remember, the source (HTML, CSS, JavaScript) gets delivered with it :)
该解决方案对于内容超出浏览器窗口底部的页面效果不佳。
尝试这样的事情:
That solution doesn't work well for pages that have content extending beyond the bottom of the browser window.
Try something like this instead: