<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
@font-face {
font-family: 'iconfont'; /* project id 243811 */
src: url('https://at.alicdn.com/t/font_jr5082jui97r2j4i.eot');
src: url('https://at.alicdn.com/t/font_jr5082jui97r2j4i.eot?#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_jr5082jui97r2j4i.woff') format('woff'),
url('https://at.alicdn.com/t/font_jr5082jui97r2j4i.ttf') format('truetype'),
url('https://at.alicdn.com/t/font_jr5082jui97r2j4i.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont";
font-size:16px;
font-style:normal;
}
</style>
</head>
<body>
</body>
</html>
你用另一种模式试试 在class里把图标代表的字母写上 如果要改变颜色 直接调节i标签的颜色
需要 将字体文件以base64编码的方式引入内嵌到样式文件中
@font-face{
src : url("data:application/x-font-ttf;charset=utf-8;base64,XXXXXXXXXXXX") format("ttf");
}
实际使用过程将那一长串”X“换成自己的base64编码即可。