- 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 混入
- Foundation 類庫
- Foundation - Motion UI
- Foundation 實用資源
- Foundation - 快速指南
- Foundation - 實用資源
- Foundation - 討論
基礎 - 媒體物件節對齊
說明
你可以分別使用 .middle 和 .bottom 類將節對齊在中間或底部。
示例
以下示例展示了在 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>Media Object Section Alignment</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>Media Object Section Alignment Example</h2>
<div class = "media-object">
<div class = "media-object-section middle">
<div class = "thumbnail">
<img src = "/foundation/images/kitchen_sink/winter.jpg" alt = "Section Alignment">
</div>
</div>
<div class = "media-object-section">
<h4>Foundation</h4>
<p>Foundation is a family of responsive front-end frameworks that make it
easy to design beautiful responsive websites, apps and emails that look
amazing on any device.
</p>
<p>Foundation is semantic, readable, flexible, and completely customizable.
Foundation for Sites is jam-packed with features to help people rapidly build
content-focused websites.
</p>
</div>
<div class = "media-object-section bottom">
<div class = "thumbnail">
<img src = "/foundation/images/kitchen_sink/winter.jpg" alt = "Section Alignment">
</div>
</div>
</div>
</body>
</html>
輸出
讓我們執行以下步驟以檢視上面給出的程式碼如何執行 −
儲存上面給出的 HTML 程式碼 media_section_alignment.html 檔案。
在瀏覽器中開啟此 HTML 檔案,將顯示如下輸出。
foundation_containers.htm
廣告