<分区>
<分区>
我使用以下代码通过 Bootstrap
创建页脚:
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container">
<div class="navbar-header">
<span class="navbar-brand">Ok Bye</span>
</div>
<p class="navbar-text navbar-right">company © 2017</p>
</div>
</nav>
我想在页面底部有一个静态的页脚
,而不是一直在viewport
中可见的。 Bootstrap
方法是什么?
最佳答案
静态页脚在 Bootstrap 中有一个实现。您不需要使用 <nav>
CSS:
/* Sticky footer styles
-------------------------------------------------- */
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
HTML:
<footer class="footer">
<div class="container">
...
</div>
</footer>
关于html - 使用导航栏 Bootstrap 静态页脚,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43055979/