模態(tài)框在任何一個(gè)系統(tǒng)的布局里面都是很重要的東西。其實(shí)個(gè)人覺得直接一個(gè)alert()更好,但現(xiàn)在很多人覺得alert()的彈出框太不給力。同時(shí)alert()里面也不宜放置太多文本。如果需要做注冊的“服務(wù)協(xié)議”等本頁面內(nèi)彈出窗口,此時(shí)可以考慮使用到Ratchet的模態(tài)框。
效果如下:
實(shí)現(xiàn)代碼如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--自適應(yīng)手機(jī)屏幕--> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> <!--適應(yīng)蘋果手機(jī)--> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <!--不要被百度轉(zhuǎn)碼--> <meta http-equiv="Cache-Control" content="no-siteapp"/> <!--引入RatChet資源--> <script type="text/javascript" src="js/ratchet.min.js"></script> <link href="css/ratchet.min.css" rel="stylesheet" type="text/css" > <title>Modal</title> </head> <body> <div class="content"> <a href="#Modalid" class="btn btn-primary btn-block">打開模態(tài)框</a> <div id="Modalid" class="modal"> <header class="bar bar-nav"> <a class="icon icon-close pull-right" href="#Modalid"></a> <h1 class="title">模態(tài)框標(biāo)題</h1> </header> <div class="content"> <p class="content-padded">模態(tài)框內(nèi)容</p> </div> </div> </div> </body> </html>
到此這篇關(guān)于Ratchet 模態(tài)框的實(shí)現(xiàn)的文章就介紹到這了,更多相關(guān)Ratchet 模態(tài)框內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!
標(biāo)簽:永州 青島 遼源 池州 西藏 新疆 棗莊 漯河
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Ratchet 模態(tài)框的實(shí)現(xiàn)》,本文關(guān)鍵詞 Ratchet,模態(tài),框,的,實(shí)現(xiàn),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。