2021/10/29 导航

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/head.css"/>
</head>
<body>
<div class="head">
<div class="line1">
<span class="log">
<img src="img/img/logo/yinLogo.png" >
</span>
<ul>
<li><a href="#">购物须知</a></li>
<li><a href="#">购物须知</a></li>
<li><a href="redaing.html">购物须知</a></li>
</ul>
</div>

<div class="line2">
<span class="log">
<img src="img/img/logo/shop-logo-v1.png" >
</span>
<div>
<input type="text" class="search">
<span class="btr"></span>
</div>
<ul>
<li><img src="./img/img/icon/avatar.png" ><a href="login.html">登录</a></li>
<li><a href="#">我的订单</a></li>
<li><img src="img/img/icon/cart-logo-v1.png" ><a href="#">购物车</a></li>
</ul>
</div>
<hr >
<div class="line3">
<span class="title"><a href="#">艺人分类</a></span>
<ul>
<li><a class="active" href="#" target="_top">首页</a></li>
<li><a href="#">专辑</a></li>
<li><a href="#">明星周边</a></li>
<li><a href="#">明星同款</a></li>
<li><a href="#">个护美妆</a></li>
<li><a href="#">影漫周边</a></li>
<li><a href="#">食品</a></li>
<li><a href="#">服装配饰</a></li>
</ul>
</div>
</div>
</body>
</html>

 

 

 

 

 

 

 

body{
margin: 0px;
}
.head{
background-color: #222;
}
.head ul{
padding-left: 0px;
}
.head ul li{
display: inline-block;
}
.head a{
text-decoration: none;
color: #CCCCCC;
display: block;
}
.head .line1{
background-color: #111;
display: flex;
justify-content: space-between;/* 中间全空 两端对齐 */
align-items: center;/* 元素垂直居中 */
}
.head .line1 .log{
margin-left: 100px;
}
.head .line1 ul{
margin-right: 100px;
}
.head .line1 ul li{
width: 150px;
border-right: 1px solid #999999;
text-align: center;
}
.head .line1 ul li a{
color: #999999;
}
.head .line1 ul li:last-child{
border: none;
}


.head .line2{
width: 1000px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.head .line2 div{
position: relative;
}
.head .line2 .search{
color: #FFFFFF;
font-size: 16px;
display: inline-block;
width: 435px;
height: 40px;
border: none;
background: url(../img/img/icon/search_icon.png);
background-position: 0 -43px;
outline: none;
padding-left: 18px;
}
.head .line2 .btr{
display: inline-block;
height: 40px;
width: 20px;
background-color: white;
position: absolute;
background: url(../img/img/icon/search_icon.png);
background-position: 27px -84px;
right: 20px;
}
.head .line2 .search:focus{
background-position: 0px 1px;
color: #333333;
}
.head .line2 .search:focus + .btr{
background-position: 22px -43px;
}
.head .line2 ul li a{
display: inline-block;
}
.head .line2 ul li{
margin: 0px 15px;
}
.head .line2 ul li img{
display: inline-block;
height: 24px;
width: 24px;
vertical-align: middle;/* 中间居中 */
margin-right: 10px;
}
.head hr{/* hr是由两个边框决定的*/
border: none;
border-bottom: 1px solid #999999;
margin-bottom: 0px;
}
.head .line3{
width: 1000px;
margin: 0px auto;
display: flex;
justify-content: space-between;
align-items: center;/* 垂直居中 */
}
.head .line3 .title a{
display: block;
background-color: #000000;
line-height: 53px;
width: 120px;
text-align: center;
}
.head .line3 ul{
margin: 0px;
}
.head .line3 li{
width: 90px;
text-align: center;
line-height: 53px;
}
.head .line3 li a:hover{
color: #DE4767;
border-bottom: 4px solid #DE4767;
line-height: 45px;
}
.head .line3 .active{
color: #DE4767;
border-bottom: 4px solid #DE4767;
line-height: 45px;
}

 

上一篇:CAA中交互选择对象——设置接收消息反应


下一篇:css每周小结