- 目标效果
- 分析
- 代码实现
<!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>
</head>
<style>
* {
padding: 0;
margin: 0;
}
li {
list-style: none;
}
a {
text-decoration: none;
font-size: 14px;
}
.nav-tab>li {
position: relative;
float: left;
width: 80px;
height: 41px;
text-align: center;
}
.nav-tab li a {
display: block;
width: 100%;
height: 100%;
line-height: 41px;
color