bootstrap模态框加滚动条

互联网 20-11-20

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

推荐:《bootstrap基础教程》

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

代码如下:

/*不使用页面的滚动条*/ /*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模态框加滚动条的详细内容,更多内容请关注技术你好其它相关文章!

来源链接:
免责声明:
1.资讯内容不构成投资建议,投资者应独立决策并自行承担风险
2.本文版权归属原作所有,仅代表作者本人观点,不代表本站的观点或立场
标签: bootstrap
上一篇:php获取远程图片并下载保存到本地的方法分析 下一篇:bootstraptable 隐藏列的方法

相关资讯