本文摘自PHP中文网,作者爱喝马黛茶的安东尼,侵删。

在html文件的<style></style>标签中加上如下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | .modal-dialog {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.modal-content {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
.modal-body {
overflow-y: scroll;
position: absolute;
top: 55px;
bottom: 65px;
width: 100%;
}
.modal-header .close {margin-right: 15px;}
.modal-footer {
position: absolute;
width: 100%;
bottom: 0;
}
|
然后再打开模态框,可以看到,滚动条已经出现了。
阅读剩余部分
相关阅读 >>
bootstrap框架是什么意思
bootstrap有什么ui框架?
bootstrap有cdn吗
快速入门bootstrapvue
bootstrap插件是什么
css怎么修改滚动条的样式
bootstrap能做什么
bootstrap table如何删除行
使用bootstrap-table实现分页和排序
bootstrap整体架构包含哪些模块
更多相关阅读请进入《bootstrap》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » bootstrap模态框如何加滚动条