- 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.cn/npm/[email protected]/dist/css/foundation.min.css" integrity="sha256-1mcRjtAxlSjp6XJBgrBeeCORfBp/ppyX4tsvpQVCcpA= sha384-b5S5X654rX3Wo6z5/hnQ4GBmKuIJKMPwrJXn52ypjztlnDK2w9+9hSMBz/asy9Gw sha512-M1VveR2JGzpgWHb0elGqPTltHK3xbvu3Brgjfg4cg5ZNtyyApxw/45yHYsZ/rCVbfoO5MSZxB241wWq642jLtA==" 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
广告