当前第2页 返回上一页
页面主内容顶部和底部都被固定导航条给遮住了。为了避免固定导航条遮盖内容,我们需要在body上做一些处理:
1 2 3 4 5 6 7 | body {
padding-top: 70px;/*有顶部固定导航条时设置*/
padding-bottom: 70px;/*有底部固定导航条时设置*/
}
< div class = "navbar navbar-default navbar-fixed-top" role = "navigation" >
…
</ div >
|
其实除了这种解决方案之外,我们还有其他的解决方法,把固定导航条都放在页面内容前面:
1 2 3 4 | < div class = "navbar navbar-default navbar-fixed-bottom" role = "navigation" >
…
</ div >
< div class = "content" >我是内容</ div >
|
在文件中添加下列样式代码:
1 2 3 4 5 6 | .navbar-fixed-top ~ .content {
padding-top: 70px;
}
.navbar-fixed-bottom ~ .content {
padding-bottom: 70px;
}
|
推荐:bootstrap入门教程
以上就是bootstrap有多少种常用class的详细内容,更多文章请关注木庄网络博客!
返回前面的内容
相关阅读 >>
layui和bootstrap区别
bootstrap怎么快速入门
bootstrap.js有什么用
详解bootstrap中的辅助类
bootstrap的好处
bootstrap模态框加滚动条
bootstrap模态框有什么用
如何解决360浏览器不兼容bootstrap问题
vue.js怎么引入bootstrap
c#如何使用bootstrap模板
更多相关阅读请进入《bootstrap》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » bootstrap有多少种常用class