1.到阿里巴巴字体图标库 创建一个项目 然后往项目里添加你喜欢的字体图标
2.选择下图所示的选项3.点击其右边的下载至本地
4.下载完后打开并将下面红框中的东西放到vscode中
5.
复制代码
6. 实例
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<style>
.inco{
height: 3rem;
width: 3rem;
fill: currentColor;
overflow: hidden;
transition: all 1s;
}
.other{
fill: blue;
opacity: 0.6;
}
.other:hover{
fill: skyblue;
opacity: 0.8;
}
</style>
<body>
<i>
<svg class="inco other">
<use xlink:href="#icon-yonghu"></use>
</svg>
</i>
<script src="./pack/iconfont.js"></script>
</body>
</html>
注意图表的地址得加 #