freeCodeCamp/guide/chinese/miscellaneous/add-font-awesome-icons-to-o.../index.md

27 lines
826 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: Add Font Awesome Icons to Our Buttons
localeTitle: 添加字体真棒图标到我们的按钮
---
## 添加字体真棒图标到我们的按钮
Font Awesome是一个方便的图标库。这些图标是矢量图形以`.svg`文件格式存储。这些图标就像字体一样对待。您可以使用像素指定其大小并且它们将采用其父HTML元素的字体大小。
继承人如何添加图标:
```html
<i class="fa fa-thumbs-up"></i>
```
以下是将该图标插入按钮的方法:
```html
<button class="btn btn-block btn-primary"><i class="fa fa-thumbs-up"></i> Like</button>
```
#### 更多信息:
在您的网站上获取字体真棒: [字体很棒 - 入门](http://fontawesome.io/get-started/)
查看所有可用的字体真棒图标: [图标](http://fontawesome.io/icons/)