
- Foundation 通用部分
- Foundation - 全域性樣式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 實用工具
- Foundation - 媒體查詢
- Foundation - 網格
- Foundation - 彈性網格
- Foundation - 表單
- Foundation - 可見性類
- Foundation - 基本排版
- Foundation - 排版輔助功能
- Foundation - 基本控制元件
- Foundation - 導航
- Foundation - 容器
- Foundation - 媒體
- Foundation - 外掛
- Foundation SASS
- Foundation - Sass 函式
- Foundation - Sass 混合
- Foundation 庫
- Foundation - Motion UI
- Foundation 有用資源
- Foundation - 快速指南
- Foundation - 有用資源
- Foundation - 討論
基礎 - 彈性網格高階尺寸調整
說明
如果列中不包含尺寸類,那麼它會自動展開並填滿列中剩餘的空間。多個列也會保持相等的空間。
收縮 類用於使列收縮,即佔用內容所需的水平空間。
示例
以下示例演示了 Foundation 中高階尺寸調整的使用 -
<!DOCTYPE html> <html> <head> <meta name = "viewport" content = "width = device-width, initial-scale = 1"> <title>Foundation Template</title> <!-- Compressed CSS --> <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 = "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>Example of Flex Grid</h2> <div class = "row"> <div class = "small-5 columns" style = "background-color:#8BD6EE;">Small 5 columns</div> <div class = "columns" style = "background-color:#C0B0F0;">Expanded columns</div> <div class = "columns" style = "background-color:#8BD6EE;">Expanded columns</div> </div> <br/> <h2>Shrink column</h2> <div class = "row"> <div class = "shrink columns" style = "background-color:#FF6347;"> Shrink column </div> <div class = "columns" style = "background-color:#7B68EE;"> Expanded columns </div> </div> </body> </html>
輸出
讓我們執行以下步驟,瞭解上面給出的程式碼是如何工作的 -
將上面給出的 html 程式碼儲存為 advanced_sizing.html 檔案。
在瀏覽器中開啟此 HTML 檔案,顯示如下輸出。
foundation_flex_grid.htm
廣告