Home > Web Front-end > Bootstrap Tutorial > bootstrap modal box plus scroll bar

bootstrap modal box plus scroll bar

藏色散人
Release: 2020-11-25 18:10:29
Original
3413 people have browsed it

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;}".

bootstrap modal box plus scroll bar

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">
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template