bootstrap模态框如何加滚动条
            
                    来源:动视网
                                        责编:小采
                                        时间:2020-11-27 15:01:38
                    
            
            
                         
                
                
                    bootstrap模态框如何加滚动条
                    bootstrap模态框如何加滚动条:在html文件的<style></style>标签中加上如下代码: .modal-dialog { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .modal-content { /*overflow-y: scroll; */ position:
                    
                 
                
             
                        导读bootstrap模态框如何加滚动条:在html文件的<style></style>标签中加上如下代码: .modal-dialog { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .modal-content { /*overflow-y: scroll; */ position:
                        
            
 

在html文件的<style></style>标签中加上如下代码:
 .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;
 }然后再打开模态框,可以看到,滚动条已经出现了。
     
    
    
        bootstrap模态框如何加滚动条
        bootstrap模态框如何加滚动条:在html文件的<style></style>标签中加上如下代码: .modal-dialog { position: absolute; top: 0; bottom: 0; left: 0; right: 0; } .modal-content { /*overflow-y: scroll; */ position: