模態框在任何一個系統的布局里面都是很重要的東西。其實個人覺得直接一個alert()更好,但現在很多人覺得alert()的彈出框太不給力。同時alert()里面也不宜放置太多文本。如果需要做注冊的“服務協議”等本頁面內彈出窗口,此時可以考慮使用到Ratchet的模態框。
<!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">
<!--自適應手機屏幕-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<!--適應蘋果手機-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!--不要被百度轉碼-->
<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">打開模態框</a>
<div id="Modalid" class="modal">
<header class="bar bar-nav">
<a class="icon icon-close pull-right" href="#Modalid"></a>
<h1 class="title">模態框標題</h1>
</header>
<div class="content">
<p class="content-padded">模態框內容</p>
</div>
</div>
</div>
</body>
</html>
到此這篇關于Ratchet 模態框的實現的文章就介紹到這了,更多相關Ratchet 模態框內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章,希望大家以后多多支持腳本之家!