HTML5 样板中的粘性页脚
我正在尝试在样板中实现粘性页脚,但我找不到实现此目的的方法。我已经尝试过 Michael Gorman 和 史蒂夫·海切尔< /a> 但两者都不适合我。
我研究过,发现 Boilerplate 不支持 Sticky Footer。你们中有人在这个问题上有运气吗?
要查看我真正需要粘性页脚的页面,请转到此处
感谢您的帮助。干杯
I am trying to implement a sticky footer in boilerplate but I can't find a way for this to work. I have tried solutions posted by Michael Gorman and Steve Hatcher but both do not work for me.
I have researched and found that Sticky Footer is not supported by Boilerplate. Have any of you had any luck with this issue.
To see a page where I really need a sticky footer, please go here
Thanks for helping. Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了确保页脚始终位于页面的绝对底部,您可以使用此问题中接受的答案: 使 div 停留在底部即使有滚动条,
您也可能会发现它需要一些微调才能完全按照您的设计要求工作。
To ensure that the footer is always at the absolute bottom of the page you can use the answer accepted in this question: Make div stay at bottom of page's content all the time even when there are scrollbars
You will prob find that it requires a little fine tuning to work exactly as you require for your design.
如果您只希望一段 HTML 无论滚动如何都保持在屏幕的同一位置,则可以在元素上使用
position:fixed
。这将创建类似于您在 Facebook 上看到的效果,其中顶部的蓝色条和底部的聊天窗口保持可见。If you just want a piece of HTML that stays on the same position of the screen regardless of the scrolling, you can use
position:fixed
on the element. This will create an effect similar to what you see on facebook, where the blue bar at the top, and the chat window at the bottom stay visible.