【发布时间】:2017-01-30 20:37:30
【问题描述】:
我有一个小网页。我正在尝试在页面底部放置页脚。在移动设备上,当用户滚动到最后时,它自然会很好地显示出来。但在桌面上,页脚显示在窗口中间。
我怎样才能将页脚放在屏幕底部,但不是以粘性方式,它始终位于屏幕底部,我只是为了避免它位于屏幕窗口的中间大于网页内容。
我正在寻找使用 Bootstrap 或纯 CSS 的解决方案。
这是我的页面的示例,请参阅 http://jsbin.com/cibixegeqi/edit?html,css,output
代码:
<body>
<div>
<h1>Some content</h1>
<p>This is a really small web page. On a standard mobile it is a little more than a screen, but on a laptop it is only half a window.</p>
</div>
<div id="footer">
<b>This is my footer.</b> I want it to be on the bottom of the window, but not sticky, just want to avoid that it is in the middle of the screen on a larger screen.
</div>
</body>
【问题讨论】:
-
你能提供你的代码吗?
标签: twitter-bootstrap css twitter-bootstrap-3