bootstrap底部导航栏,Bootstrap静止在页面底部的导航栏
用Bootstrap制作页面,使用<header><content><footer>结构时会遇到,页面内容较少,底部栏或页脚浮到页面中间。
Bootstrap本身提供了navbar-fixed-top 、navbar-fixed-bottom 、navbar-static-top三种方式使用导航条,却无法解决此问题,我们需要navbar-static-bottom 。
需要添加的CSS:
<style type="text/css">
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0; width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
</style>
HTML:
<html>
...
<body>
...
<div class="container">
</div>
...
<footer class="footer">
...页脚内容...
</footer>
</body>
</html>
例子: Sticky footer with fixed navbar
Bootstrap静止在页面底部的导航栏的相关内容如下:
华为手机导航栏怎么设置| doss蓝牙音箱| 安卓底部导航栏设置| 华为手机底部导航栏| 导航栏| 导航栏设置| 安卓底部导航栏的实现| 安卓 底部导航栏|