- 基礎概況
- 基礎 - 全域性樣式
- 基礎 - Sass
- 基礎 - JavaScript
- 基礎 - JavaScript 公用程式
- 基礎 - 媒體查詢
- 基礎 - 網格
- 基礎 - Flex 網格
- 基礎 - 表單
- 基礎 - 可見性類
- 基礎 - 基本排版
- 基礎 - 排版助手
- 基礎 - 基本控制元件
- 基礎 - 導航
- 基礎 - 容器
- 基礎 - 媒體
- 基礎 - 外掛
- 基礎 SASS
- 基礎 - Sass 函式
- 基礎 - Sass Mixin
- 基礎庫
- 基礎 - 運動 UI
基礎 - 按鈕鏤空樣式
說明
使用 .hollow 類為你的按鈕新增一個鏤空外觀。若要建立一個預設樣式,請在你的設定檔案中的 $button-fill 變數。
示例
以下示例演示如何在基礎中使用 hollow 樣式。
<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" 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.htm
廣告