<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href=" https://heerey525.github.io/layui-v2.4.3/layui-v2.4.5/css/layui.css">
<style>
/* 基本样式设置 */
*{margin:0;padding:0;}
.l{float:left;}
.r{float:right;}
.i{margin-left: 5px;}
/* 导航开始 */
.header_1{width:100%;
background-color:#F0EFE1;
border-top:1px solid #E4E2CE;
border-bottom:px solid #E4E2CE;
}
.header{margin:0 auto;
width:1190px;
height:30px;
font-size: 12px;
font-family: "宋体";
color:#A29D85;
line-height:30px;
}
a{text-decoration: none;
color:#A29D85;
margin-left:20px;
}
.left a:hover{color:#ff0000;
text-decoration: underline;}
.right a:hover{color:#ff0000;
}
.right a:hover i{color:#ff6500;font-weight: bold;
}
/* 导航左侧部分 */
.header left{width:500px;
height:inherit;
}
.header .left span{
line-height:30px;
}
/*
导航右侧部分 */
.header .right{width:600px;
height:inherit;
}
.head_right_a{display: inline-block;
position: relative;}
.head_right_a ul{
border:1px solid #ccc;border-top:none;
list-style: none;
width:80px;
display:none;
color:#A29D85;
position: absolute; }
.head_right_a:hover ul{display:block;
text-decoration:none;
}
.head_right_a ul li:hover{background-color:#ccc;}
</style>
<title>下拉菜单的实现</title>
</head>
<body>
<div class="header_1">
<div class="header">
<!-- 导航栏左侧部分 -->
<div class="left l">
<a href="" >天猫首页</a></span>
<span>喵,欢迎来天猫</span>
<span><a href="">请登录</a></span>
<span><a href="">免费注册</a></span>
</div>
<!-- 导航栏右侧部分 -->
<div class="right r">
<a href="" class="head_right_a" >我的淘宝
<i class="layui-icon layui-icon-down"></i>
<ul class="baobei">
<li>已买到的宝贝</li>
<li>我的足迹</li>
</ul>
</a>
<a href=""> <i class="layui-icon layui-icon-cart"></i> 购物车<i class="layui-icon layui-icon-down"></i></a>
<a href="" class="head_right_a">收藏夹
<ul class="shouchang">
<li>收藏的宝贝</li>
<li>收藏的店铺</li>
</ul>
</a>
<a href="" class="head_right_a">商品分类</a>
<a href="" class="head_right_a">专家中心</a>
<a href="" class="head_right_a">联系客服</a>
<a href="" class="head_right_a">网站导航</a>
</div>
</div>
</div>
</body>
</html>