返回淘宝导航二级菜......登陆

淘宝导航二级菜单的写法

邈看银河系2019-06-18 13:25:1966

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>html课程学习-淘宝导航条</title>

<link rel="shortcut icon" type="image/X-icon" href="image/logo2.png">

<link rel="stylesheet" type="text/css" href="css/index.css">

<link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css">





</head>

<body>

<div class="header">

<div class="header_content">

<div class="header_left">

<a href="" class="header_a">中国大陆 &nbsp;<i class=" fa fa-angle-down "></i></a>

<a href="" style="color: #FF5000">亲,请登录</a>

<a href="">免费注册</a>

<a href="">手机逛淘宝</a>


</div>

<div class="header_right">

<a href="" class="header_a">我的淘宝&nbsp;<i class=" fa fa-angle-down "></i>

<ul>

<li>已买到宝贝</li>

<li>我的足迹</li>

</ul>

</a>

<a href=""><i class="fa fa-bicycle" aria-hidden="true" style="color: #FF5000"></i>&nbsp;购物车</a>

<a href="" class="header_a"><i class=" fa fa-star "></i>收藏夹&nbsp;<i class=" fa fa-angle-down "></i>

<ul>

<li>已买到宝贝</li>

<li>我的足迹</li>

<li>天猫商城</li>

<li>天猫商城</li>

</ul>


</a>

<a href="">商品分类</a>

<a href="" class="header_a">卖家中心&nbsp;<i class=" fa fa-angle-down "></i></a>

<a href="" class="header_a">联系客服&nbsp;<i class=" fa fa-angle-down "></i></a>

<a href="" class="header_a">网站导航&nbsp;<i class=" fa fa-angle-down "></i>

<ul>

<li>回到首页</li>

<li>天猫商城</li>

<li>天猫商城</li>

<li>天猫商城</li>

<li>天猫商城</li>

</ul>


</a>





</div>

</div>

<div class="clear"></div>

</div>



</body>

</html>

/*-----------一下是css部分--------------------*/


*{margin: 0px;padding: 0px;}

.clear{clear: both;}

li{list-style: none;}

a{text-decoration: none;color: #6C6C6C;}

.header{width: 100%;background-color: #F5F5F5;}

.header_content{width: 1200px; margin: 0px auto;line-height: 40px;}

.header_left{height: 40px; float: left;}

.header_left a{margin-right: 5px;}/*设置a标签字体间距*/

.header_content a:hover{color: #FF5000;}

.header_right{height: 40px;float: right;}

.header_a{display: inline-block; height: 40px;width: 90px; text-align: center;position: relative;}

.header_a:hover{background-color: #fff;}

.header_a ul{border: 1px solid #F5F5F5;display: none;border-top: none;}/*给ul一个像素的边框并且设置颜色.display: none 隐藏这个ul边框*/

.header_a:hover ul{display: block; position: absolute;width: 100px;}/*移动鼠标显示下拉菜单*/

.header_a ul li:hover{background-color:  #ccc;}

.header_a ul li{color: #6C6C6C;height: 30px;line-height: 30px;text-align: left; padding: 0px 3px; margin: 5px 0px;}



最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送
  • PHP中文网