zoukankan      html  css  js  c++  java
  • 设置bootstrap modal模态框的宽度和宽度

    (1)修改宽度可以通过修改modal中的modal-dialog这个div宽度实现

    [html] view plain copy
     
    1. <div class="modal-dialog" style="600px">   

    (2) 修改高度和宽度最好的办法是修改modal-body中添加的控件,设置控件的大小,modal会自动适应。

    例如

    [html] view plain copy
     
    1. <div class="modal fade in" id="_modalDialog" tabindex="-1" role="dialog" aria-labelledby="modalLabel"  
    2.      style="display: block;">  
    3.   <div class="modal-dialog" role="document" style=" 680px;">  
    4.     <div class="modal-content">  
    5.       <div class="modal-header">  
    6.         <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"</span>  
    7.         </button>  
    8.         <h4 class="modal-title" id="modalLabel">选择移动到的目录</h4></div>  
    9.       <div id="_modalDialog_body" class="modal-body">  
    10.             <!--  设置这个div的大小,超出部分显示滚动条 -->  
    11.         <div id="selectTree" class="ztree" style="height:300px;overflow:auto; ">   
    12.         </div>  
    13.   
    14.       </div>  
    15.       <div class="modal-footer">  
    16.         <button type="submit" class="btn btn-primary">确定</button>  
    17.         <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>  
    18.       </div>  
    19.     </div>  
    20.   </div>  
    21. </div>  

    显示效果图

     
     
  • 相关阅读:
    JS-BOM操作-Location、history、常用弹窗、屏幕属性
    JS的基础DOM操作-选取父子级元素、动态生成元素、修改元素、Classlist
    setup
    循环请求接口,统一处理
    多个url文件下载
    扁平数据结构转Tree
    es6 解构赋值
    watch与computed与props
    v-model与.sync组件通信
    v-on="$listeners"和v-bind="$attrs"
  • 原文地址:https://www.cnblogs.com/telwanggs/p/7421824.html
Copyright © 2011-2022 走看看