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

        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號
        主站蜘蛛池模板: 无码人妻精品一区二区蜜桃AV| 日韩精品毛片| 精品国产综合区久久久久久| 久久久久99精品成人片试看| 国产欧美日韩综合精品二区| 国产精品视频免费观看| 亚洲国产精品无码久久| 国产精品日韩深夜福利久久| 黑人精品videos亚洲人| 人人妻人人澡人人爽精品日本 | 国产精品分类视频分类一区| 亚洲日韩精品一区二区三区| 久久99精品久久久久久9蜜桃| 色偷偷888欧美精品久久久| 成人精品一区二区三区中文字幕| 久久久WWW成人免费精品| 国产成人精品大尺度在线观看| 久久国产精品久久精品国产| 国产成人精品手机在线观看| 日韩av无码久久精品免费| 在线中文字幕精品第5页| 精品视频一区二区三区| 国产精品 视频一区 二区三区| 久久精品免费观看| 国产精品网站在线观看| 99re6这里有精品热视频| 国产精品无码无卡在线播放| 精品亚洲麻豆1区2区3区| 欧美肥屁VIDEOSSEX精品| 亚洲AV永久无码精品成人| 中文无码久久精品| 中日韩产精品1卡二卡三卡| 日韩蜜芽精品视频在线观看| 亚洲电影日韩精品| 亚洲av午夜成人片精品电影| 亚洲国产精品成人网址天堂| 亚洲欧美精品一区久久中文字幕| 日韩一区二区精品观看| 亚洲国产午夜中文字幕精品黄网站| 亚洲国产精品综合久久一线 | 91麻豆精品国产|