摘要:<!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">
<link rel="stylesheet" href="static/css/font-awesome-4.7.0/css/font-awesome.min.css">
<title>导航布局</title>
<style>
* {
margin: 0;
padding: 0;
}
.clear {
clear: both;
}
.header {
width: 100%;
height: 40px;
background-color: #F5F5F5
}
.header_content {
width: 1200px;
margin: 0 auto;
line-height: 40px;
font-size: 13px;
}
a {
text-decoration: none;
color: #6c6c6c;
}
.header_l {
float: left;
}
.header_content a {
margin-right: 5px;
line-height: 40px;
height: 40px;
}
.header_r {
float: right;
}
.header_content a:hover {
color: #FF5000
}
.header_r a {
width: 80px;
}
#hover_w {
display: inline-block;position: relative
}
#hover_w:hover {
background-color: #fff
}
#hover_w ul{
float: left;list-style: none;width: 100px;background-color: #fff;
display: none;border: 1px #f5f5f5 solid;border-top: none;
}
#hover_w ul li{
color: #6c6c6c;height: 30px;line-height: 30px;text-align: left;padding: 0 5px;margin: 3px 0;
}
#hover_w:hover ul{
display: block;color: #6c6c6c;position: absolute;
}
#hover_w ul li:hover {
background-color: #F5F5F5;
}
.hr{
position: relative;
}
.h_r{
width: 1200px;height: 500px;position: absolute;
left: -1120px;float: left;display: none;border: 1px #f5f5f5 solid;border-top: none;
}
.h_r_1{width: 300px;height: 500px;position: absolute;}
.h_r_2{width: 300px;height: 500px;position: absolute;left: 300px;top: 0px}
.h_r_3{width: 300px;height: 500px;position: absolute;left: 600px;top: 0px}
.h_r_4{width: 300px;height: 500px;position: absolute;left: 900px;top: 0px}
.hr:hover .h_r{
display: block;
}
</style>
</head>
<body>
<div class="header">
<div class="header_content">
<div class="header_l">
<span class="h_l_sp"id="hover_w">中国大陆 <i class="fa fa-angle-down"></i></span>
<a href="" style="color:#FF5000">亲,请登录</a>
<a href="">免费注册</a>
<a href="" style="margin-left:5px;">手机逛淘宝</a>
</div>
<div class="header_r">
<a href="" id="hover_w">我的淘宝 <i class="fa fa-angle-down"></i>
<ul>
<li>已买到的商品</li>
<li>我的足迹</li>
</ul>
</a>
<a href=""><span class="fa fa-cart-plus" style="color:#FF5000"></span> 购物车 <i class="fa fa-angle-down"></i></a>
<a href="" id="hover_w"><span class="fa fa-star"></span> 收藏夹 <i class="fa fa-angle-down"></i>
<ul>
<li>收藏的宝贝</li>
<li>收藏的商铺</li>
</ul>
</a>
<a href="">商品分类</a>
<a href="" id="hover_w">卖家中心 <i class="fa fa-angle-down"></i>
<ul>
<li>免费开店</li>
<li>已卖出的宝贝</li>
<li>出售中的宝贝</li>
<li>卖家服务市场</li>
<li>卖家培训中心</li>
<li>体验中心</li>
<li>问商友</li>
</ul>
</a>
<a href="" id="hover_w">联系客服 <i class="fa fa-angle-down"></i>
<ul>
<li>消费者客服</li>
<li>卖家客服</li>
</ul>
</a>
<a href="" id="hover_w" class="hr"><span class="fa fa-navicon" style="color:#FF5000"></span> 网站导航 <i class="fa fa-angle-down"></i>
<div class="h_r">
<div class="h_r_1">
<p style="color:#ff6500 ;font-size:18px;">主题市场</p>
</div>
<div class="h_r_2">
<p style="color:lime ;font-size:18px;">特色市场</p>
</div>
<div class="h_r_3">
<p style="color:mediumorchid ;font-size:18px;">阿里APP</p>
</div>
<div class="h_r_4">
<p style="color:royalblue ;font-size:18px;">精彩推荐集合</p>
</div>
</div>
</a>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
批改老师:灭绝师太批改时间:2019-02-14 09:09:31
老师总结:代码在老师的基础上还需要修改:比如带有二级下拉菜单的导航不建议使用a链接嵌套