BootStrap 彈出層代碼
更新時間:2017年02月09日 11:20:54 作者:輕擾時光
這篇文章主要介紹了BootStrap 彈出層代碼的相關(guān)資料,非常補充,具有參考借鑒價值,需要的朋友可以參考下
廢話不多說了,直接給大家貼代碼了,具體代碼如下所示:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Bootstrap</title> <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" /> </head> <body> <!--注意:1.彈出層必須放在body里 2.彈出層里面不能再嵌套別的層 3.彈出層彈出來以后,頁面的滾動條會被覆蓋--> <div class="container"> <div class="row"> <button class="btn btn-primary" data-toggle="modal" data-target=".myModal1">彈出一個小層</button><!--data-toggle="modal"給button一個點擊事件,彈出一個模態(tài)窗口--> <button class="btn btn-primary" data-toggle="modal" data-target=".myModal2">彈出一個大層</button> </div> </div> <div class="modal fade myModal1"><!--modal,彈出層父級,fade使彈出層有一個運動過程--> <div class="modal-dialog"><!--modal-dialog,彈出層--> <div class="modal-content"><!--modal-content,彈出層內(nèi)容區(qū)域--> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button><!--將關(guān)閉按鈕放在標題前面可以使按鈕位于右上角--> <h4>水果攤</h4> </div><!--modal-header,彈出層頭部區(qū)域--> <div class="modal-body"> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> </div><!--modal-body,彈出層主體區(qū)域--> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">確定</button><!--data-dismiss="modal"點擊按鈕之后可以關(guān)閉窗口--> </div><!--modal-footer,彈出層底部區(qū)域--> </div> </div> </div> <div class="modal myModal2"><!----> <div class="modal-dialog modal-lg"><!--還有modal-sm,modal-md--> <div class="modal-content"> <div class="modal-header"> <button class="close" data-dismiss="modal">×</button> <h4>水果攤</h4> </div> <div class="modal-body"> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> <p>蘋果葡萄香蕉柿子火龍果便宜賣了,多買優(yōu)惠更多,還在等什么呢?</p> </div> <div class="modal-footer"> <button class="btn btn-primary" data-dismiss="modal">確定</button> </div> </div> </div> </div> <script src="js/jquery-2.1.0.js"></script> <script src="js/bootstrap.js"></script> </body> </html>
以上所述是小編給大家介紹的BootStrap 彈出層代碼,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
JavaScript基礎(chǔ)教程之如何實現(xiàn)一個簡單的promise
看了些promise的介紹,還是感覺不夠深入,所以下面這篇文章主要給大家介紹了關(guān)于JavaScript基礎(chǔ)教程之如何實現(xiàn)一個簡單的promise的相關(guān)資料,文中通過示例代碼介紹的非常詳細,需要的朋友可以參考下2018-09-09javascript版的in_array函數(shù)(判斷數(shù)組中是否存在特定值)
這篇文章主要介紹了javascript版的in_array函數(shù)(判斷數(shù)組中是否存在特定值),需要的朋友可以參考下2014-05-05JavaScript實現(xiàn)網(wǎng)頁版五子棋游戲
這篇文章主要為大家詳細介紹了JavaScript實現(xiàn)網(wǎng)頁版五子棋游戲,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下2021-07-07Bootstrap3 Grid system原理及應(yīng)用詳解
這篇文章主要為大家詳細介紹了Bootstrap3 Grid system原理及應(yīng)用,具有一定的參考價值,感興趣的小伙伴們可以參考一下2016-09-09JS函數(shù)節(jié)流和函數(shù)防抖問題分析
這篇文章主要介紹了JS函數(shù)節(jié)流和函數(shù)防抖問題分析,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2017-12-12