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 怎么添加关闭按钮

easyui和bootstrap的区别

extjs 和 bootstrap是什么

bootstrap怎么实现圆角边框

bootstrap 如何创建错误提示

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




打赏

取消

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

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

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

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

评论

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