- 通用 Foundation
- Foundation - 全域性樣式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 實用工具
- Foundation - 媒體查詢
- Foundation - 網格
- Foundation - 靈活網格
- Foundation - 表單
- Foundation - 可見性類
- Foundation - 基本版式
- Foundation - 排版助手
- Foundation - 基本控制元件
- Foundation - 導航
- Foundation - 容器
- Foundation - 媒體
- Foundation - 外掛
- Foundation SASS
- Foundation - Sass 函式
- Fodunation - Sass Mixin
- Foundation 庫
- Foundation - 動作介面
- Foundation 實用資源
- Foundation - 快速指南
- Foundation - 實用資源
- Foundation - 討論
大螢幕的關閉畫布顯示
描述
在大且中螢幕上使用 .reveal-for-medium 或 .reveal-for-large 類設定左右關閉畫布。
示例
以下示例演示了在 Foundation 中使用 在較大螢幕上顯示 -
<!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>Off Canvas Reveal on Larger Screens</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>Off-canvas Reveal on Larger Screen Example</h2>
<div class = "off-canvas-wrapper">
<div class = "off-canvas-wrapper-inner" data-off-canvas-wrapper>
<div class = "off-canvas position-left reveal-for-large" id = "off_canvas_left" data-off-canvas></div>
<div class = "off-canvas-content" data-off-canvas-content>
Welcome to Foundation
</div>
<button type = "button" class = "button" data-toggle = "off_canvas_left">Click Here</button>
</div>
</div>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
輸出
讓我們執行以下步驟,以瞭解上述給定程式碼如何工作 -
將上述給定的 html 程式碼儲存為 off_canvas_larger_screen_reveal.html 檔案。
在瀏覽器中開啟此 HTML 檔案,顯示如下所示的輸出。
foundation_containers.htm
廣告