Home > Web Front-end > Bootstrap Tutorial > How to add scroll bars to bootstrap modal box

How to add scroll bars to bootstrap modal box

爱喝马黛茶的安东尼
Release: 2019-07-17 13:53:04
Original
3637 people have browsed it

How to add scroll bars to bootstrap modal box

Add the following code to the tag of the html file:

 .modal-dialog {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
        }
 
        .modal-content {
            /*overflow-y: scroll; */
            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;
        }
Copy after login

Then open the modal box, you can see, The scroll bar has appeared.

Related recommendations: "Bootstrap Getting Started Tutorial"

As shown below:

How to add scroll bars to bootstrap modal box

The above is the detailed content of How to add scroll bars to bootstrap modal box. 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