bootstrap模态框加滚动条


本文摘自PHP中文网,作者藏色散人,侵删。

bootstrap模态框加滚动条的方法:首先打开相应的代码文件;然后通过设置属性为“.modal-content {overflow: auto;max-height:300px;}”即可。

推荐:《bootstrap基础教程》

Bootstrap模态框添加滚动条(一级)

代码如下:

1

2

3

4

5

6

7

8

/*不使用页面的滚动条*/

/*css:

给模态框设置overflow-y: hidden;即为取消掉页面滚动条的使用*/

#HelpModal{margin-top: 95px;height: 300px;overflow-y: hidden;}

/*添加滚动条*/

.modal-content {overflow: auto;max-height:300px;}

/*html:模态框最外层设置id属性的overflow-y: hidden;,权重值高于自定义的.modal-open .modal类名设置的overflow-y: auto;*/

<div class="modal fade" id="HelpModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

以上就是bootstrap模态框加滚动条的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

bootstrap是干什么的

bootstrap如何拖拽组件

bootstrap是哪个组织创立的

怎么引用bootstrap轮播图

bootstrap组件怎么使用

bootstrap能做什么

bootstrap的优点是什么

如何用bootstrap定义上弹菜单

vue.js和bootstrap之间有什么区别?

bootstrap中的按钮样式,图片样式 介绍

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

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

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

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

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

评论

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