1 Font class方法
- 下载到本地导入到项目目录中
2.
html中引用
<link rel="stylesheet" type="text/css" href="./iconfont.css"/>
- 标签中引用
<span class="iconfont icon-xxx"></span>
2 在线的方式
- 获取在线链接
- html中引用
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1945166_mbivgxzc7qo.css"/>
- 标签中引用
<span class=" iconfont icon-component"></span>
3.Unicode的使用方式
- 复制代码到style标签或者css文件
- 标签中引用
<span class="iconfont"></span>
<span class="iconfont"></span>
4.Symbol方式
- 引入js
2. 自定义样式
.icon {
width: 1em; height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
font-size: 48px;
color: #0000CC;
}
3.标签中引用
<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-sousuo"></use>
</svg>