- Foundation 教程
- Foundation - 首頁
- Foundation - 概覽
- Foundation - 安裝
- Foundation - Starter 專案
- Foundation - Kitchen Sink
- 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 - 討論
基礎 - 按鈕組基礎
說明
透過使用 .button-group,可以將任意數量的按鈕放入容器中。組中的每個按鈕都由一個小間隙分隔開。
示例
以下示例演示了在 Foundation 中使用基本按鈕組。
<html>
<head>
<title>Button Group Basics</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/css/foundation.min.css" crossorigin="anonymous">
</head>
<body>
<div class = "button-group">
<a class = "button">First button</a>
<a class = "button">Second button</a>
<a class = "button">Third button</a>
</div>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/vendor/jquery.min.js"></script>
<script src = "https://cdnjs.cloudflare.com/ajax/libs/foundation/6.0.1/js/foundation.min.js"></script>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
輸出
讓我們執行以下步驟來了解上面給出的程式碼是如何工作的 −
儲存上面給出的 html 程式碼button_group_basics.html 檔案。
在瀏覽器中開啟此 HTML 檔案,顯示的輸出如下圖所示。
foundation_basic_controls.htm
廣告