Java教程

音悦5

本文主要是介绍音悦5,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

<!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">
<div class="loge"><img src="img/logo/yinLogo.png" alt="" /></div>
<div class="right">
<a href="#">官方微博</a> |
<a href="#">官方微博</a> |
<a href="#">官方微博</a>
</div>
</div>
<div class="line2">
<div class="loge"><img src="img/logo/shop-logo-v1.png" alt="" /></div>
<div class="search">
<input type="text"></input>
<span></span>
</div>
<ul>
<li><img src="img/icon/avatar.png"/><a href="#">登录</a></li>
<li><a href="#">我的订单</a></li>
<li><img src="img/icon/cart-logo-v1.png"/><a href="#">购物车</a></li>
</ul>
</div>
<hr />
<div class="line3">
<div class="title">艺人分类</div>
<ul>
<li><a href="#"class="active" 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>
</ul>

</div>
</div>
</body>
</html>

 

 

CSS

body{
margin: 0;
}

.head{
background-color: #333333;
}

.head a{
text-decoration: none;
color: white;
}

.head .line1{
background-color: black;
position: absolute;
width: 100%;
height: 34px;
}

.head .line1 .loge{
display: inline-block;
position: absolute;/*相对定位*/
left: 100px;
}

.head .line1 .right{
display: inline-block;
right: 100px;
position: absolute;
line-height: 34px;
color: #999999;
}

.head .line1 .right a{
color: #999999;
width: 120px;
display: inline-block;
text-align: center;
}

.head .line2{
padding: 34px 100px 0px;
display: flex;
justify-content: space-between;
align-items: center;
}

.head .line2 ul li{
display: inline-block;
margin-left: 15px;
}

.head .line2 ul li img{
height: 18px;
width: 18px;
vertical-align: top;
margin-right: 3px;
}

.head .line2 .search input{
height: 40px;
width: 434px;
background-color: transparent;
background-image: url(../img/icon/search_icon.png);
background-position: 0 -42px;
border: none;/*清除边框*/
outline: none;/*清除轮廓线*/
padding-left: 16px;
font-size: 16px;
}

.head .line2 .search input:focus{/*点击事件*/
background-position: 0 1px;
}

.head .line2 .search {
position: relative;/*搜索图标向下移动*/
}

.head .line2 .search span{
position: absolute;
height: 30px;
width: 30px;
display: inline-block;
background-image: url(../img/icon/search_icon.png);
background-position: -453px -4px;
top: 6px;
right: 16px;
}

.head .line2 .search input:focus+span{
background-position: -453px -46px;
}


.head hr{
border-top: none;
border-bottom: 1px solid #999999;

}

.head .line3 ul{
margin: 0;
padding-left: 0;
}

.head .line3 li{
display: inline-block;
width: 100px;
text-align: center;
}

.head .line3 li a {
display: inline-block;
height: 54px;
line-height: 54px;
}

.head .line3 li a:hover,.head .line3 .active{
color: #FF407F;
border-bottom: 4px solid #FF407F;
height: 50px;
}

这篇关于音悦5的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!