Home > Article > Web Front-end > bootstrap modal box plus scroll bar
How to add scroll bars to the bootstrap modal box: first open the corresponding code file; then set the property to ".modal-content {overflow: auto;max-height:300px;}".
Recommendation: "bootstrap basic tutorial"
Bootstrap modal box adding scroll bar (level one)
The code is as follows:
/*不使用页面的滚动条*/ /*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">
The above is the detailed content of bootstrap modal box plus scroll bar. For more information, please follow other related articles on the PHP Chinese website!