std*_*err 68 html css footer twitter-bootstrap
我正在尝试Bootstrap,我想知道,如果内容滚动,我怎么能在底部修复页脚而不会从页面中消失?
Jos*_* KG 167
要获得粘贴到视口底部的页脚,请将其固定在以下位置:
footer {
position: fixed;
height: 100px;
bottom: 0;
width: 100%;
}
Run Code Online (Sandbox Code Playgroud)
Bootstrap在包含该类的Navbar> Placement部分中包含此CSS fixed-bottom.只需将此类添加到您的页脚元素:
<footer class="fixed-bottom">
Run Code Online (Sandbox Code Playgroud)
Bootstrap文档:http://v4-alpha.getbootstrap.com/components/navbar/#placement
小智 69
添加这个:
<div class="footer navbar-fixed-bottom">
Run Code Online (Sandbox Code Playgroud)
编辑:类navbar-fixed-bottom已更改fixed-bottom为Bootstrap v4-alpha.6.
http://v4-alpha.getbootstrap.com/components/navbar/#placement
| 归档时间: |
|
| 查看次数: |
270217 次 |
| 最近记录: |