摘要:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&
<!DOCTYPE html>
<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>
<style>
*{
margin: 0;
padding: 0;
}
a{
text-decoration: none;
color:#1E1E1E;
font-size: 13px;
/* float: left;
margin-left: 10px; */
}
.header{
background-color: #F5F4F6;
width: 100%;
height: 42px;
}
.header-content{
width: 1200px;
margin: 0 auto;
line-height: 42px;
}
.header_left{
float: left;
line-height: 42px;
}
.header_right{
float: right;
line-height: 42px;
width: 600px;
background-color: pink;
}
.header_right a{
width: 66px;
display: inline-block;
margin-right: 5px;
padding-left: 5px;
padding-right: 5px;
}
.header_left a{
margin-right: 5px;
padding-left: 5px;
padding-right: 5px;
display: inline-block;
}
a:hover{
color: #ff5000;
background: #fff;
}
</style>
</head>
<body>
<div class="header">
<div class="header-content">
<div class="header_left">
<a href="" class="header_a">中国大陆</a>
<a href="" style="color:#ff5000">亲,请登陆</a>
<a href="">免费注册</a>
<a href="">手机逛淘宝</a>
<span><a href="">手机逛淘宝</a></span>
</div>
<div class="header_right">
<a href="">我的淘宝</a>
<a href="">购物车</a>
<a href="">收藏夹</a>
<a href="">商品分类</a>
<a href="">卖家中心</a>
<a href="">联系客服</a>
<a href="">网站导航</a>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
批改老师:天蓬老师批改时间:2019-01-24 11:48:43
老师总结:代码写得很工整, <div class="clear"></div>, 还有更优雅的清浮动方式,