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模态框加滚动条的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

vue能用bootstrap

extjs 和 bootstrap是什么

bootstrap的表单怎么选日期

bootstrap 不显示图标怎么办

bootstrap怎么实现自适应高度

bootstrap有树状菜单吗

如何使用bootstrap实现年月日的时间选择器

浅谈vue项目中使用npm安装bootstrap和jquery

jquery框架和bootstrap框架区别

学习bootstrap需要什么基础

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




打赏

取消

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

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

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

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

评论

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