bootstrap有多少种常用class


当前第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》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...