- Foundation 教程
- Foundation - 主頁
- Foundation - 概述
- Foundation - 安裝
- Foundation - 開始專案
- Foundation - Kitchen Sink
- Foundation 通用
- Foundation - 全域性樣式
- Foundation - Sass
- Foundation - JavaScript
- Foundation - JavaScript 工具
- Foundation - 媒體查詢
- Foundation - 網格
- Foundation - Flex Grid
- 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 - 按鈕大小
說明
按鈕的大小和形狀可以透過附加使用 tiny、small、large、expanded 和 small expanded 等類進行更改。
示例
以下示例演示瞭如何在 Foundation 中更改按鈕大小。
<html>
<head>
<title>Button Sizing</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/css/foundation.min.css" crossorigin="anonymous">
</head>
<body>
<a class = "tiny button" href = "#">Tiny button</a>
<a class = "small button" href = "#">Small button</a>
<a class = "button" href = "#">Button</a>
<a class = "large button" href = "#">Large button</a>
<a class = "expanded button" href = "#">Expanded button</a>
<a class = "small expanded button" href = "#">Small expanded button</a>
<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_sizing.html 檔案中。
在瀏覽器中開啟此 HTML 檔案,顯示的輸出如下所示。
foundation_basic_controls.htm
廣告