目录
一.字体图标
1.字体图标实际是字体
2.免费下载网址
(没有图找设计师要svg 上传矢量图去除颜色)
3.字体图标语法:<link rel="stylesheet" href="./iconfont/iconfont.css">
4.实现代码
<!DOCTYPE html>
<html>
<head lang="en">
<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>模拟淘宝导航</title>
<!--引入字体图标样式表-->
<link rel="stylesheet" href="./iconfont/iconfont.css">
<style>
*{
margin: 0;
padding: 0;
}
li{
list-style: none;
}
a{
color: #333;
text-decoration: none;
}
.nav{
width: 200px;
margin: 50px auto;
font-size: 12px;
}
.icon-cart-empty{
color: orange;
}
</style>
</head>
<body>
<div class="nav">
<ul>
<li>
<a href="#">
<!--iconfont的类名是固定的-->
<span class="iconfont icon-cart-empty"></span>
<span>购物车</span>
<span class="iconfont icon-a-xiala2"></span>
</li>
</ul>
</div>
</body>
</html>
5.实现效果