溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

如何實現(xiàn)Ratchet模態(tài)框

發(fā)布時間:2021-03-20 11:20:58 來源:億速云 閱讀:124 作者:小新 欄目:web開發(fā)

這篇文章主要介紹如何實現(xiàn)Ratchet模態(tài)框,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

模態(tài)框在任何一個系統(tǒng)的布局里面都是很重要的東西。其實個人覺得直接一個alert()更好,但現(xiàn)在很多人覺得alert()的彈出框太不給力。同時alert()里面也不宜放置太多文本。如果需要做注冊的“服務(wù)協(xié)議”等本頁面內(nèi)彈出窗口,此時可以考慮使用到Ratchet的模態(tài)框。

效果如下:

如何實現(xiàn)Ratchet模態(tài)框

實現(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)手機屏幕-->
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
        <!--適應(yīng)蘋果手機-->
        <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>
                    <h2 class="title">模態(tài)框標題</h2>
                </header>                
                <div class="content">
                 <p class="content-padded">模態(tài)框內(nèi)容</p>
                </div>
            </div>
        </div>
    </body>
</html>

以上是“如何實現(xiàn)Ratchet模態(tài)框”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI