Foundation - 按钮空心样式
说明
使用 .hollow 类为您的按钮提供空心样式外观。要设置默认样式,请更改设置文件中的 $button-fill 变量。
示例
以下示例演示了如何在 Foundation 中使用 空心样式。
<html> <head> <title>Button Hollow Style</title> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/foundation-sites@6.5.1/dist/css/foundation.min.css" integrity="sha256-1mcRjtAxlSjp6XJBgrBeeCORfBp/ppyX4tsvpQVCcpA= sha384-b5S5X654rX3Wo6z5/hnQ4GBmKuIJKMPwrJXn52ypjztlnDK2w9+9hSMBz/asy9Gw sha512-M1VveR2JGzpgWHb0elGqPTltHK3xbvu3Brgjfg4cg5ZNtyyApxw/45yHYsZ/rCVbfoO5MSZxB241wWq642jLtA==" crossorigin="anonymous"> </head> <body> <button class = "hollow button" href = "#">Primary</button> <button class = "secondary hollow button" href = "#">Secondary</button> <button class = "success hollow button" href = "#">Success</button> <button class = "alert hollow button" href = "#">Alert</button> <button class = "warning hollow button" href = "#">Warning</button> <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_hollow_style.html 文件。
在浏览器中打开此 HTML 文件,将显示如下所示的输出。
foundation_basic_controls.html