- 基礎通用
- 基礎 - 全域性樣式
- 基礎 - Sass
- 基礎 - JavaScript
- 基礎 - JavaScript實用程式
- 基礎 - 媒體查詢
- 基礎 - 網格
- 基礎 - 彈性網格
- 基礎 - 表單
- 基礎 - 可見性類
- 基礎 - 基本文字排版
- 基礎 - 文字排版幫助程式
- 基礎 - 基本控制元件
- 基礎 - 導航
- 基礎 - 容器
- 基礎 - 媒體
- 基礎 - 外掛
- 基礎 SASS
- 基礎 - Sass函式
- 基礎 - Sass Mixin
- 基礎庫
- 基礎 - 運動UI
基礎 - 外掛基本均衡器
說明
透過包含屬性data-equalizer,可以使內容的高度等於其他內容的高度。如需使子元素的高度與父元素的高度相同,請使用屬性data-equalizer-watch。
示例
以下示例演示了在Foundation中使用均衡器外掛的方法:-
<!DOCTYPE html>
<html>
<head>
<title>Foundation Template</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<!-- 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="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/js/foundation.min.js" crossorigin="anonymous"></script>
</head>
<body>
<h2>Example of Equalizer</h2>
<div class = "row" data-equalizer>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#C0B0F0;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book.
</p>
</div>
</div>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#8BD6EE;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</div>
</div>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#C0B0F0;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s
</p>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
輸出
讓我們執行以下步驟,瞭解上面的程式碼是如何工作的:-
儲存以上給出的HTML程式碼equalizer_basic.html檔案。
在瀏覽器中開啟此HTML檔案,顯示的輸出如下所示。
foundation_plugins.htm
廣告