站長資訊網
        最全最豐富的資訊網站

        bootstrap的模態框在哪是什么

        bootstrap的模態框是覆蓋在父窗體上的,是一個子窗體;模態框的目的是顯示來自一個單獨的源內容,可以在不離開父窗體的情況下有一些互動,子窗體可以提供信息交互等等,可以通過添加“.modal-sm”類來創建一個小模態框,添加“.modal-lg”類創建一個大模態框。

        bootstrap的模態框在哪是什么

        本教程操作環境:Windows10系統、bootstrap5版、DELL G3電腦

        bootstrap的模態框在哪是什么

        模態框(Modal)是覆蓋在父窗體上的子窗體。通常,目的是顯示來自一個單獨的源的內容,可以在不離開父窗體的情況下有一些互動。子窗體可提供信息交互等。

        如何創建模態框

        以下實例創建了一個簡單的模態框效果 :

        <!DOCTYPE html> <html> <head>   <title>Bootstrap 實例</title>   <meta charset="utf-8">   <meta name="viewport" content="width=device-width, initial-scale=1">   <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">   <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>   <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>   <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div class="container">   <h2>模態框實例</h2>   <!-- 按鈕:用于打開模態框 -->   <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">     打開模態框   </button>       <!-- 模態框 -->   <div class="modal fade" id="myModal">     <div class="modal-dialog">       <div class="modal-content">             <!-- 模態框頭部 -->         <div class="modal-header">           <h4 class="modal-title">模態框頭部</h4>           <button type="button" class="close" data-dismiss="modal">&times;</button>         </div>             <!-- 模態框主體 -->         <div class="modal-body">           模態框內容..         </div>             <!-- 模態框底部 -->         <div class="modal-footer">           <button type="button" class="btn btn-secondary" data-dismiss="modal">關閉</button>         </div>           </div>     </div>   </div>    </div> </body> </html>

        輸出結果:

        bootstrap的模態框在哪是什么

        模態框尺寸

        我們可以通過添加 .modal-sm 類來創建一個小模態框,.modal-lg 類可以創建一個大模態框。

        尺寸類放在 <div>元素的 .modal-dialog 類后 :

        <!DOCTYPE html> <html> <head>   <title>Bootstrap 實例</title>   <meta charset="utf-8">   <meta name="viewport" content="width=device-width, initial-scale=1">   <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">   <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>   <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>   <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div class="container">   <h2>模態框實例</h2>   <!-- 按鈕:用于打開模態框 -->   <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">     打開模態框   </button>       <!-- 模態框 -->   <div class="modal fade" id="myModal">     <div class="modal-dialog modal-sm">       <div class="modal-content">             <!-- 模態框頭部 -->         <div class="modal-header">           <h4 class="modal-title">模態框頭部</h4>           <button type="button" class="close" data-dismiss="modal">&times;</button>         </div>             <!-- 模態框主體 -->         <div class="modal-body">           模態框內容..         </div>             <!-- 模態框底部 -->         <div class="modal-footer">           <button type="button" class="btn btn-secondary" data-dismiss="modal">關閉</button>         </div>           </div>     </div>   </div>    </div> </body> </html>

        輸出結果:

        bootstrap的模態框在哪是什么

        贊(0)
        分享到: 更多 (0)
        網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
        主站蜘蛛池模板: 国产精品毛片VA一区二区三区| 青青青青久久精品国产h| jizz国产精品网站| 久久99精品久久久久久野外| 国产成人精品高清在线观看99| 一夲道无码人妻精品一区二区| 国产区精品高清在线观看| 国产精品一二区| 精品国产三级a在线观看| 亚洲国产精品无码久久九九| 国产精品内射婷婷一级二| 久久久精品免费国产四虎| 2020国产精品| 国产亚洲精品资源在线26u| 午夜一级日韩精品制服诱惑我们这边 | 久久精品国产一区二区三区日韩| 无码精品人妻一区二区三区漫画 | 久久久久国产精品麻豆AR影院 | 精品国产一区二区三区久久| 日韩国产精品无码一区二区三区| 久久精品中文字幕有码| 国产精品成人一区二区| 欧美性videofree精品| 国内精品久久久久久野外| 91精品成人免费国产| 99国产欧美久久久精品蜜芽| 精品不卡一区二区| 精品国际久久久久999波多野| 亚洲av午夜福利精品一区人妖| 亚洲&#228;v永久无码精品天堂久久 | 国产在线精品一区二区三区不卡| 国产精品高清2021在线| 国产91精品一区二区麻豆亚洲| 99热亚洲精品6码| 国产乱子伦精品无码专区| 亚洲综合精品香蕉久久网97| 午夜精品福利视频| 国产精品videossex白浆| 国产精品哟女在线观看| 精品久久久久久无码免费| 久久e热在这里只有国产中文精品99 |