【发布时间】:2015-06-07 05:18:11
【问题描述】:
我的页面底部有一个页脚。它具有以下 HTML 和 CSS:
<style>
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
#footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #e7e7e7;
}
</style>
<div id="footer">
<div class="container col-md-3 text-center">
<p class="text-muted">© 2015, LuMa</p>
</div>
<div class="container col-md-6"></div>
<div class="container col-md-3 text-center">
<p><a href="/terms">Terms</a> & <a href="/privacy">Privacy</a></p>
</div>
</div>
这在桌面上看起来不错:
但在移动设备上存在换行符:
没关系,但是如何在移动设备上放大页脚?我对 CSS 不是很熟悉,但我听说有一种方法可以在不同尺寸的设备上应用不同的样式。有人给我提示吗?
【问题讨论】:
标签: html css twitter-bootstrap footer