摘要:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>頭部導(dǎo)航欄</title><link rel="stylesheet" href="css/font-awesome-4.7.0/css/font-awesom
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>頭部導(dǎo)航欄</title>
<link rel="stylesheet" href="css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/1.css">
</head>
<body>
<div class="header">
<div class="header-center">
<div class="header-left">
<a href=""><i class="fa fa-home"></i> 天貓首頁</a>
<p>喵,歡迎來天貓</p>
<a href="">請登錄</a>
<a href="">免費注冊</a>
</div>
<div class="header-right">
<a href="">我的淘寶 <i class="fa fa-caret-down"></i></a>
<a href=""><i class="fa fa-heart"></i> 我關(guān)注的品牌</a>
<a href=""><i class="fa fa-shopping-cart"></i> 購物車</a>
<a href="">收藏夾 <i class="fa fa-caret-down"></i></a>
<a href="">| 淘寶網(wǎng)</a>
<a href="">企業(yè)購</a>
<a href="" style="color:#9c9c9c;"><i class="fa fa-th-list"></i> 網(wǎng)站導(dǎo)航 <i class="fa fa-caret-down"></i></a>
</div>
</div>
</div>
</body>
</html>
//css部分:
*{
margin:0;
padding:0;
}
a{
text-decoration:none;
color:#9C9C9C;
font-size:14px;
line-height:30px;
margin-left:15px;
}
a:hover{
color:#D55959;
text-decoration:underline;
}
.fa-home,.fa-heart,.fa-shopping-cart,.fa-th-list{
color:#D55959;
}
p{
display:inline;
color:#9C9C9C;
font-size:14px;
line-height:30px;
margin-left:15px;
}
.header{
width:100%;
height:30px;
background:#F2F2F2;
}
.header-center{
width:1350px;
margin:0px auto;
}
.header-left{
height:30px;
float:left;
}
.header-right{
height:30px;
float:right;
}
.header-a{
display:inline-block;
height:30px;
width:90px;
text-align:center;
}
.header-a:hover{
background:#fff;
}
總結(jié):頭部導(dǎo)航欄對于我們初學(xué)者也是可以比較容易掌握的,只要在布局的過程中認真細心點,對基本的知識有了一定的掌握就可以做得好了。在布局的過程中,對字體的大小,間距之間還是很難做到和原網(wǎng)頁一樣,還是要繼續(xù)努力!
批改老師:韋小寶批改時間:2019-03-11 08:58:17
老師總結(jié):一個網(wǎng)站的導(dǎo)航對于網(wǎng)站來說是非常重要的部分 在寫導(dǎo)航的時候一定要注意到美觀