<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>淘宝导航栏</title>
<style>
*{
padding:0;
margin:0;
list-style: none;
}
a{
text-decoration: none;
}
.nav::after{
content: "";
display:block;
clear:both;
}
.nav .list-item{
float:left;
margin:0 5px;
height:30px;
line-height: 30px;
/*border:1px solid black;*/
}
.nav .list-item a{
padding: 0 4px;
color:#f40;
font-weight: bold;
height:30px;
display: inline-block;
border-radius: 7px;
}
.nav .list-item a:hover{
background-color: #f40;
color:#fff;
}
</style>
</head>
<body>
<ul class="nav">
<li class="list-item"><a href="#">天猫</a></li>
<li class="list-item"><a href="#">聚划算</a></li>
<li class="list-item"><a href="#">天猫超市</a></li>
</ul>
</body>
</html>