24.1-伪元素的运用
一、字体图标:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- 引入阿里字体库下面的css文件 -->
<link rel="stylesheet" type="text/css" href="icon/iconfont.css">
<style>
div {
width: 200px;
height: 40px;
margin: 200px auto;
border: 1px solid red;
}
div::after {
font-family: "iconfont";
/*  将代码的&#x去掉,用\代替 */
content: "\e669";
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>