- 一般基礎
- 基礎 - 全域性樣式
- 基礎 - Sass
- 基礎 - JavaScript
- 基礎 - JavaScript 實用程式
- 基礎 - 媒體查詢
- 基礎 - 網格
- 基礎 - Flex Grid
- 基礎 - 表單
- 基礎 - 可見性類
- 基礎 - 基本排版
- 基礎 - 排版輔助
- 基礎 - 基本控制元件
- 基礎 - 導航
- 基礎 - 容器
- 基礎 - 媒體
- 基礎 - 外掛
- 基礎 SASS
- 基礎 - Sass 函式
- 基礎 - Sass Mixins
- 基礎庫
- 基礎 - 動作 UI
基礎框架 - 基礎預告
描述
你可以使用 reveal 類建立模態對話方塊或彈出視窗。
示例
以下示例演示了在基礎中使用 basic reveal −
<!doctype 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.0" />
<title>Reveal Basics</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/css/foundation.min.css" crossorigin="anonymous">
<!-- Compressed JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/js/foundation.min.js" crossorigin="anonymous"></script>
</head>
<body>
<h2>Reveal Basics Example</h2>
<p><a data-open = "reveal_modal">Click here to open modal</a></p>
<div class = "reveal" id = "reveal_modal" data-reveal>
<h2>Foundation</h2>
<p>Foundation is a family of responsive front-end frameworks that make
it easy to design beautiful responsive websites, apps and emails
that look amazing on any device.
</p>
<button class = "close-button" data-close aria-label = "Close reveal" type = "button">
<span aria-hidden = "true">×</span>
</button>
</div>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
輸出
讓我們執行以下步驟,瞭解以上給定的程式碼如何運作 −
儲存以上給定的 html 程式碼 reveal_basics.html 檔案。
在此瀏覽器中開啟此 HTML 檔案,顯示如下輸出。
foundation_containers.htm
廣告