导航布局作业

原创 2018-12-20 15:27:11 163
摘要:HTML:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>作业</title> <link rel="stylesheet" type="text/css" href="index.c

HTML:

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title>作业</title>

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

<link rel="stylesheet" type="text/css" href="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"><i class="fa fa-street-view"></i>重庆</a>

</div>

<div class="header_right">

<a href="">你好,请登录</a>

<a href="" style="color: red;">免费注册</a>

<a href="" class="header_a">我的订单</a>

<a href="">我的京东<i class="fa fa-angle-down"></i></a>

<a href="" class="header_a">京东会员</a>

<a href="">企业采购<i class="fa fa-angle-down"></i></a>

<a href="" class="header_a nhover">客户服务<i class="fa fa-angle-down"></i></a>

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

<a href="" class="nhover">手机京东</a>

</div>

</div>

<div class="clear">


</div>

</div>

</body>

</html>

CSS:

*{margin: 0;

padding: 0;

}

a{

text-decoration: none;

color: #737373;

font-size: 13px;

}

.clear{

clear: both;

}

.header{

width: 100%;

height: 40px;

background-color: #F5F5F5;

}

.header_content{

width: 1300px;

height: 40px;

margin: 0 auto;

line-height: 40px;

}

.header_left{

height: 40px;

float: left;

}

.header_left a{

margin-right: 5px;

}

.header_content a:hover{

color: red;

}

.header_right{

width: 800px;

height: 40px;

float: right;

}

.header_a{display: inline-block;

height: 40px;

width: 90px;

text-align: center;

}

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

.nhover{

display: inline-block;

height: 40px;

width: 90px;

text-align: center;

}


批改老师:灭绝师太批改时间:2018-12-20 15:34:33
老师总结:下次的作业最好附上课程图片,课程疑虑和知识总结都可以放到作业中反馈!

发布手记

热门词条