# Font Awesome ### 在web中使用免費icon ###### #icon #html #style --- Font Awesome 是一個提供icon的網站 免費的會員就有很多能用的icon。 在不想自己畫icon時,可以上來找資源。 --- ## How to Use ### 1. 註冊帳號 #### Font Awesome: https://fontawesome.com/ #### 直接使用e-mail註冊就好 ### 2. 找出自己的CDN 並貼到HTML    ### 3. 找想要的ICON (注意版本) #### 到icon區 #### icon區網站:https://fontawesome.com/icons?d=gallery&p=2  #### 找到icon點進去後 複製html tag  #### 貼到html想放的地方  --- ## Use in React ### 1. 下載資源 用npm下載以下3個資料包 ``` npm i --save @fortawesome/fontawesome-svg-core npm install --save @fortawesome/free-solid-svg-icons npm install --save @fortawesome/react-fontawesome ``` ### 2. 匯入icon ``` import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { 'icon名稱' } from "@fortawesome/free-solid-svg-icons"; ``` ### 3. 使用icon 在要使用處輸入: ``` <FontAwesomeIcon icon={ 'icon名稱' } /> ``` ## END
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up