vue how to use iconfont (Ali Baba icon library)

1. Log iconfont official website with a github account or other supported accounts https://www.iconfont.cn/

2. Add the storage of the desired icon (the icon is a shopping cart)

3. Into the shopping cart, add to a project (not just New)

4. Select the Add download to a local (this screenshot is before, I did not download new, live together and see ~ ~ ~)

5. You can then put the code in this folder (you can modify the file name: for example, fonts)

6. The introduction of "iconfont.css" in the main.js

7, Alibaba vector icon library, find the icon just added to the list in my project, click Copy Code

Usage: to set the class iconfont + just copy the code (IconFont must have)

<i class=" iconfont icon-smile" ></i>

Guess you like

Origin www.cnblogs.com/yaya-003/p/12039729.html