摘要:<html lang="en"> <head> <meta charset="UTF-8" /> &n
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>二级导航</title>
</head>
<style>
* {
margin: 0;
padding: 0;
}
ol,
ul,
li {
list-style: none;
box-sizing: border-box;
}
ol {
width: 400px;
margin: 0 auto;
}
li {
width: 60px;
font-size: 18px;
font-family: Microsoft YaHei;
text-align: center;
cursor: pointer;
}
ol > li {
float: left;
height: 40px;
line-height: 40px;
margin: 0 10px;
border-bottom: solid 1px gray;
position: relative;
}
ul li {
display: none;
border-bottom: solid 0px rgba(138, 135, 135, 0.5);
}
ol > li:hover {
border-bottom: solid 4px gray;
}
ol > li:hover ul li {
display: block;
}
ul li:hover {
border-bottom: solid 1px rgba(138, 135, 135, 0.5);
}
ol > li,
ol > li:hover,
ul li:hover {
transition: linear 0.1s;
}
</style>
<body>
<ol>
<li>首页</li>
<li>
床品
<ul>
<li>居家</li>
</ul>
</li>
<li>
箱包
<ul>
<li>电器</li>
</ul>
</li>
<li>
餐厨
<ul>
<li>服饰</li>
</ul>
</li>
<li>
洗护
<ul>
<li>婴童</li>
</ul>
</li>
</ol>
</body>
</html>
批改老师:天蓬老师批改时间:2019-02-18 14:19:33
老师总结:编程和我们平时工作是一样的道理, 先做对, 再求优.