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

        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號
        主站蜘蛛池模板: 国产精品福利在线播放| 91精品欧美综合在线观看| 国语自产少妇精品视频蜜桃| 成人精品一区二区久久久| 亚洲色精品aⅴ一区区三区| 国产精品人人做人人爽人人添| 精品卡一卡二卡乱码高清| 日韩精品毛片| 国产精品视频一区二区三区不卡| 99re66热这里只有精品| 亚洲AV无码成人精品区蜜桃| 久久这里有精品视频| 国产99视频精品专区| 精品久久一区二区| 国产亚洲欧美精品久久久| 亚洲av永久无码精品古装片| 无码AV动漫精品一区二区免费| 国产在线国偷精品免费看| 国产成人99久久亚洲综合精品| 久久97精品久久久久久久不卡| 国内精品九九久久久精品| 少妇人妻偷人精品免费视频| 亚洲欧美精品午睡沙发| 欧美日韩精品久久久久| 久久中文精品无码中文字幕| 韩国三级中文字幕hd久久精品| 国产精品99久久精品爆乳| 国产精品成| 国产成人精品一区二区三区| 国产99久久久国产精品~~牛| 99精品欧美一区二区三区| 1区1区3区4区产品芒果精品| 热久久这里只有精品| 伊人久久精品无码av一区| 无码国产精品一区二区免费3p| 天天爽夜夜爽夜夜爽精品视频 | 亚洲国模精品一区| 欧美日韩成人精品久久久免费看| 精品日韩欧美国产| 欧美精品一区二区在线精品| 日韩一区二区三区在线精品|