1. 字体图标类明使用
本地字体图标类名使用方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./fonts/iconfont.css">
</head>
<body>
<span class="iconfont icon-add"></span>
<i class="iconfont icon-ashbin"></i>
</body>
</html>
Unicode使用方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./fonts/iconfont.css">
<title>Document</title>
</head>
<body>
<i class="iconfont">&
<i class="iconfont">&
</body>
</html>
伪元素方法使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./fonts/iconfont.css">
</head>
<style>
span:first-child::before {
content: "\e66a";
}
span:last-child::after {
content: "\e66e";
}
.iconfont{
color: aqua;
font-size: 20px;
}
</style>
<body>
<span class="iconfont"></span>
<span class="iconfont"></span>
</body>
</html>