# Foundation 圖標
<link rel="stylesheet" href="http://static.runoob.com/assets/foundation-icons/foundation-icons.css">
Foundation 提供了 283 個圖標,你可以使用css來定義它的樣式尺寸。
圖標可用于文本,按鈕,工具條,導航欄,表單等。
以下是 Foundation 圖標的實例:
刷新按鈕:
檢測圖標:
主頁圖標:
## 圖標語法
創建圖標語法格式如下:
```
<i class="fi-name"></i>
```
_name_ 部分替換為圖標的名字。
要使用圖標我們需要在 <head> 部分添加圖標的樣式文件:
```
<link rel="stylesheet" href="http://static.runoob.com/assets/foundation-icons/foundation-icons.css">
```
## Icon 實例
以下演示了使用圖標的實例:
### 實例
```
<p>Cloud icon: <i class="fi-cloud"></i></p>
<p>Cloud icon as a link:
? <a href="#"><i class="fi-cloud"></i></a>
</p>
<p>Styled Cloud icon: <i class="fi-cloud" style="font-size:35px;color:red;"></i></p>
<p>Home icon: <i class="fi-home"></i></p>
<p>Home icon on a button:
? <button type="button" class="button">
??? <i class="fi-home"></i> Home
? </button>
</p>
<p>Home icon on a green button:
? <button type="button" class="button success">
??? <i class="fi-home"></i> Home
? </button>
</p>
<p>Home icon on a large, light blue link button:
? <a href="#" class="button info large">
??? <i class="fi-home"></i> Home
? </a>
</p>
```
## 工具條圖標
我們可以使用 `.icon-bar` 類來創建一個指定數量的工具欄圖標:
### 實例
```
<div class="icon-bar five-up">
? <a href="#" class="item">
??? <i class="fi-home"></i>
? </a>
? <a href="#" class="item">
??? <i class="fi-bookmark"></i>
? </a>
? <a href="#" class="item">
??? <i class="fi-info"></i>
? </a>
? <a href="#" class="item">
??? <i class="fi-mail"></i>
? </a>
? <a href="#" class="item">
??? <i class="fi-like"></i>
? </a>
</div>
```
圖標描述使用 `<label>` 元素:
### 實例
```
<div class="icon-bar five-up">
? <a href="#" class="item">
??? <i class="fi-home"></i>
??? <label>Home</label>
? </a>
? <a href="#" class="item">
??? <i class="fi-share"></i>
??? <label>Share</label>
? </a>
? <a href="#" class="item">
??? <i class="fi-info"></i>
??? <label>Info</label>
? </a>
? <a href="#" class="item">
??? <i class="fi-mail"></i>
??? <label>Mail</label>
? </a>
? <a href="#" class="item">
??? <i class="fi-magnifying-glass"></i>
??? <label>Search</label>
? </a>
</div>
```
`.disabled` 類可以讓圖標變成不可點擊狀態:
### 實例
```
<a href="#" class="item disabled">
? <i class="fi-share"></i>
</a>
<a href="#" class="item disabled">
??? <i class="fi-mail"></i>
</a>
```
`.vertical` 類用于創建一個垂直的工具欄:
### 實例
```
<div class="icon-bar vertical five-up">
? ....
</div>
```
## Foundation 圖標參考手冊
更多關于圖標的內容,可以參考我們的 [Foundation 圖標手冊。](foundation-ref-icons.html)
[](foundation-ref-icons.html)
- Foundation 入門
- Foundation 5 簡介
- Foundation 起步
- Foundation 文本
- Foundation 表格
- Foundation 按鈕
- Foundation 按鈕組
- Foundation 圖標
- Foundation 標簽
- Foundation 提醒框
- Foundation 進度條
- Foundation 面板
- Foundation 圖片
- Foundation 下拉菜單
- Foundation 折疊列表
- Foundation 列表
- Foundation 選項卡
- Foundation 分頁
- Foundation 價格表
- Foundation 頂部導航欄
- Foundation 側邊欄
- Foundation 滑動導航(Off-Canvas)
- Foundation 麥哲倫(Magellan)導航
- Foundation 表單
- Foundation 輸入框尺寸
- Foundation 開關
- Foundation 滑塊
- Foundation 提示框
- Foundation 模態框
- Foundation Joyride
- Foundation 均衡器(Equalizer)
- Foundation 網格
- Foundation 網格系統
- Foundation 網格 - 水平堆疊
- Foundation 網格 - 小型設備
- Foundation 網格 - 中型設備
- Foundation 網格 - 大型設備
- Foundation 塊狀網格
- Foundation 網格實例
- Foundation 參考手冊
- Foundation 圖標參考手冊
- Foundation CSS 參考手冊
- Foundation CSS 可見性