- Foundation 常規
- Foundation - 全域性樣式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 實用程式
- Foundation - 媒體查詢
- Foundation - 網格系統
- Foundation - Flex 網格系統
- Foundation - 表單
- Foundation - 可見性類
- Foundation - 基本排版
- Foundation - 排版幫助器
- Foundation - 基本控制元件
- Foundation - 導航
- Foundation - 容器
- Foundation - 媒體
- Foundation - 外掛
- Foundation SASS
- Foundation - Sass 函式
- Foundation - Sass Mixin
- Foundation 庫
- Foundation - Motion UI
- Foundation 實用資源
- Foundation - 快速指南
- Foundation - 實用資源
- Foundation - 討論
Foundation - 源排序
描述
源排序類用於在斷點之間移動列。輔助導航可以在任何裝置上將列定位在頁面左側或右側。push/pull 類可以應用於任何大小的裝置,由你選擇,例如,medium-push/pull-*, large-push/pull-*, small-push/pull-*。
示例
以下示例展示了 Foundation 中源排序的使用方式 −
<!DOCTYPE html>
<html>
<head>
<title>Foundation Template</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<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>Source Ordering</h2>
<div class = "row">
<div class = "small-5 small-push-7 columns" style = "background-color:#8BD6EE;">
Small push class
</div>
<div class = "small-7 small-pull-5 columns" style = "background-color:#C0B0F0;">
small pull class
</div>
</div>
<div class = "row">
<div class = "large-2 large-push-10 columns" style = "background-color:#808000;">
Large push class
</div>
<div class = "large-10 large-pull-2 columns" style = "background-color:#FF6347;">
Large pull class
</div>
</div>
<div class = "row">
<div class = "medium-9 medium-push-3 columns" style = "background-color:#C0B0F0;">
Medium push class
</div>
<div class = "medium-3 medium-pull-9 columns" style = "background-color:#8BD6EE;">
Medium pull class
</div>
</div>
</body>
</html>
輸出
讓我們執行以下步驟,瞭解上面給出的程式碼是如何工作的 −
將上面給出的 html 程式碼儲存到 source_ordering.html 檔案。
在瀏覽器中開啟此 HTML 檔案,輸出如下所示。
foundation_the_grid.htm
廣告