方法1
<link rel="stylesheet" href="2购物车/iconfont.css">
<style>
*{
padding: 0;
margin: 0;
}
li{
width: 90px;
height: 40px;
background-color: pink;
margin: 0 auto;
list-style: none;
text-align: center;
line-height: 40px;
}
a{
text-decoration: none;
}
</style>
</head>
<body>
<ul>
<li>
<a href="">
<span class="iconfont icon-gouwucheman"></span>
<span>购物车</span>
<span class="iconfont icon-xiangxia"></span>
</a>
</li>
</ul>
</body>
方法2
<!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="2购物车/iconfont.css">
<style>
*{
padding: 0;
margin: 0;
}
li{
width: 90px;
height: 40px;
background-color: pink;
margin: 0 auto;
list-style: none;
text-align: center;
line-height: 40px;
}
a{
text-decoration: none;
}
li a span::before{
这个也是必须写的
font-family: 'iconfont';
这里面写代码
content: "\e600";
}
li a span::after{
font-family: 'iconfont';
content: "\e601";
}
</style>
</head>
<body>
<ul>
<li>
<a href="">
<span>购物车</span>
</a>
</li>
</ul>
</body>
</html>