- 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 - 不完全行
描述
當行中所含列不滿 12 時,Foundation 會自動將最後一個元素浮動到右方。你可以將.end 類包含在最後一個元素中,使元素浮動至左方。
示例
以下示例演示如何在 Foundation 中使用incomplete_rows −
<!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>Incomplete rows example</h2>
<div class = "row">
<div class = "small-4 columns" style = "background-color:#808000;">
small-4 columns
</div>
<div class = "small-4 columns" style = "background-color:#8BD6EE;">
small-4 columns
</div>
</div>
<div class = "row">
<div class = "small-4 columns" style = "background-color:#8BD6EE;">
small-4 columns
</div>
<div class = "small-4 columns end" style = "background-color:#808000;">
small-4 columns end
</div>
</div>
</body>
</html>
輸出
讓我們執行以下步驟,瞭解以上給出的程式碼是如何工作的 −
儲存以上給定的 html 程式碼為 incomplete_rows.html 檔案。
在瀏覽器中開啟此 HTML 檔案,會顯示如下所示的輸出。
foundation_the_grid.htm
廣告