ant-design/components/iconfont/index.md

562 lines
14 KiB
Markdown
Raw Normal View History

2015-05-27 15:43:29 +08:00
# Iconfont
- category: CSS
- chinese: 字体图标
2015-06-02 12:11:49 +08:00
- order: 1
2015-06-07 17:18:14 +08:00
- nodemos: true
2015-05-27 15:43:29 +08:00
---
2015-06-07 14:01:59 +08:00
## 如何使用
2015-06-09 16:50:26 +08:00
我们对每个图标都采用了语义化的命名,使用时所有的图标都需要一个基类 `.anticon` 和对应每个图标的类。在这里,我们使用 `<i>` 标签,如下面代码演示使用即可~
2015-06-07 14:01:59 +08:00
```html
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-link"></i>
2015-06-07 14:01:59 +08:00
```
2015-06-09 12:16:39 +08:00
> 点击图标复制代码。
2015-05-27 15:43:29 +08:00
## 图标列表
2015-06-08 22:42:36 +08:00
### 一. 方向性图标
<ul class="row anticons-list fn-clear">
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-step-backward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">step-backward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-step-forward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">step-forward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-fast-backward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">fast-backward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-fast-forward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">fast-forward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-shrink"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">shrink</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-arrow-salt"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">arrow-salt</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-down"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-down</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-up"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-up</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-circle-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-circle-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-circle-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-circle-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-circleo-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-circleo-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-caret-circleo-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">caret-circleo-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-circle-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-circle-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-circle-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-circle-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-circleo-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-circleo-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-circleo-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-circleo-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-double-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-double-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-double-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-double-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-verticle-right"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-verticle-right</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-angle-verticle-left"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">angle-verticle-left</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-forward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">forward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-backward"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">backward</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-rollback"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">rollback</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-retweet"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">retweet</span>
</li>
</ul>
2015-06-08 22:42:36 +08:00
### 二. 提示建议性图标
<ul class="anticons-list fn-clear">
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-question"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">question</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-question-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">question-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-question-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">question-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-plus"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">plus</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-plus-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">plus-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-plus-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">plus-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-pause"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">pause</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-pause-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">pause-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-pause-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">pause-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-minus"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">minus</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-minus-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">minus-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-minus-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">minus-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-info-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">info-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-info-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">info-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-info"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">info</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-exclamation"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">exclamation</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-exclamation-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">exclamation-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-exclamation-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">exclamation-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-cross-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">cross-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-cross-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">cross-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-cross"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">cross</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-check-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">check-circleo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-check-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">check-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-check"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">check</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-clock-circle"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">clock-circle</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-clock-circleo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">clock-circleo</span>
</li>
</ul>
2015-06-08 22:42:36 +08:00
### 三. 网站通用图标
<ul class="anticons-list fn-clear">
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-lock"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">lock</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-android"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">android</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-apple"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">apple</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-area-chart"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">area-chart</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-bar-chart"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">bar-chart</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-bars"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">bars</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-booko"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">booko</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-calendar"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">calendar</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-cloud"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">cloud</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-cloud-download"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">cloud-download</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-code"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">code</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-copy"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">copy</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-credit-card"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">credit-card</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-delete"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">delete</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-desktop"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">desktop</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-download-line"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">download-line</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-edit"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">edit</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-ellipsis"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">ellipsis</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-environment"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">environment</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-fileo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">fileo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-file-texto"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">file-texto</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-foldero"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">foldero</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-folder-openo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">folder-openo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-github"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">github</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-hddo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">hddo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-frown"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">frown</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-meho"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">meho</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-inbox"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">inbox</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-laptop"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">laptop</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-large"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">large</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-line-chart"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">line-chart</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-link"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">link</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-lock1"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">lock1</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-logout"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">logout</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-mail"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">mail</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-menu-fold"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">menu-fold</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-menu-unfold"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">menu-unfold</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-mobile"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">mobile</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-notification"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">notification</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-paper-clip"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">paper-clip</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-pictureo"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">pictureo</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-pie-chart"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">pie-chart</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-poweroff"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">poweroff</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-reload"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">reload</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-search"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">search</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-setting"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">setting</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-share-alt"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">share-alt</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-shopping-cart"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">shopping-cart</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-smile"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">smile</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-tablet"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">tablet</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-tag"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">tag</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-tags"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">tags</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-totop"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">totop</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-unlock"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">unlock</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-upload"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">upload</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-user"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">user</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-video-camera"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">video-camera</span>
</li>
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-windows"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">windows</span>
</li>
2015-06-08 16:13:50 +08:00
<li>
2015-06-09 16:50:26 +08:00
<i class="anticon anticon-loading"></i>
2015-06-09 16:55:31 +08:00
<span class="anticon-class">loading</span>
2015-06-08 16:13:50 +08:00
</li>
</ul>
<style>
2015-06-07 17:18:14 +08:00
ul.anticons-list {
margin: 20px 0;
list-style: none;
width: 100%
}
2015-06-08 12:39:35 +08:00
ul.anticons-list li {
2015-06-07 17:18:14 +08:00
float: left;
2015-06-09 12:11:43 +08:00
margin: 5px;
2015-06-07 17:18:14 +08:00
padding-bottom: 10px;
2015-06-09 12:11:43 +08:00
width: 154px;
2015-06-07 17:18:14 +08:00
text-align: center;
list-style: none;
cursor: pointer;
2015-06-09 12:11:43 +08:00
height: 110px;
2015-06-08 12:39:35 +08:00
color: #5C6B77;
2015-06-08 12:41:37 +08:00
transition: all 0.2s ease;
2015-06-08 23:41:11 +08:00
position: relative;
}
2015-06-09 12:11:43 +08:00
ul.anticons-list li:hover,
ul.anticons-list li.zeroclipboard-is-hover {
2015-06-08 22:42:36 +08:00
background-color: #4BB8FF;
2015-06-08 12:39:35 +08:00
color: #fff;
2015-06-07 17:18:14 +08:00
border-radius: 4px;
}
2015-06-09 12:11:43 +08:00
ul.anticons-list li.copied.zeroclipboard-is-hover {
color: rgba(255,255,255,0.2);
}
ul.anticons-list li:after {
position: absolute;
top: 10px;
left: 0;
height: 100%;
width: 100%;
content: "Copied!";
text-align: center;
line-height: 110px;
color: #fff;
transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
opacity: 0;
}
ul.anticons-list li.copied:after {
opacity: 1;
top: 0;
2015-06-08 23:41:11 +08:00
}
2015-06-07 17:18:14 +08:00
.anticon {
2015-06-09 12:11:43 +08:00
font-size: 26px;
margin: 26px 0 16px;
2015-06-07 17:18:14 +08:00
}
.anticon-class {
display: block;
text-align: center;
word-wrap: break-word;
2015-06-09 12:11:43 +08:00
transform: scale(0.83);
2015-06-07 17:18:14 +08:00
font-family: Consolas;
}
</style>
2015-06-08 23:41:11 +08:00
2015-06-09 12:11:43 +08:00
<script src="/static/ZeroClipboard.js"></script>
2015-06-08 23:41:11 +08:00
<script>
$(function() {
2015-06-09 12:11:43 +08:00
ZeroClipboard.config({
swfPath: "http://static.alipayobjects.com/zeroclipboard/2.2.0/dist/ZeroClipboard.swf"
2015-06-08 23:41:11 +08:00
});
2015-06-09 12:11:43 +08:00
// clipboard
$('.anticons-list li').each(function(i, item) {
var client = new ZeroClipboard(item);
client.on( "copy", function (event) {
2015-06-09 18:11:28 +08:00
client.setText('<i className="anticon anticon-' + $(item).find('.anticon-class').html() + '"></i>');
2015-06-09 12:11:43 +08:00
});
client.on( "ready", function( readyEvent ) {
client.on( "aftercopy", function( event ) {
// `this` === `client`
// `event.target` === the element that was clicked
$(event.target).addClass('copied');
setTimeout(function() {
$(event.target).removeClass('copied');
}, 2000);
});
});
2015-06-08 23:41:11 +08:00
});
});
</script>