abstrak:<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <link rel="styl
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../static/font/css/font-awesome.css">
</head>
<style>
*{
margin: 0;
padding: 0;
}
a{
text-decoration: none;
color: #000;
font-size: 13px;
text-align: center;
}
.clear{clear: both}
#header{
width: 100%;
background-color: #f5f5f5;
}
.header_content{
width: 1200px;
background-color: red;
margin: 0 auto;
line-height: 40px;
}
.header_content a:hover{
color: #FF5000;
}
.header__left{
height: 40px;
float: left;
}
.header__left a{
margin-left: 5px;
}
.header_right{
height: 40px;
float: right;
}
.header_right a{
margin-left: 5px;
}
.header_a{
display: inline-block;
width: 90px;
height: 40px;
text-align: center;
}
.header_a:hover{
background-color: #CCCCCC;
}
</style>
<body>
<div id="header">
<div class="header_content">
<div class="header__left">
<a href="" class="header_a">中國(guó)大陸 <i class="fa fa-angle-down"></i></a>
<a href="" style="color: #FF5000; ">親,請(qǐng)登錄</a>
<a href="">免費(fèi)注冊(cè)</a>
<a href="">手機(jī)逛淘寶</a>
</div>
<div class="header_right">
<a href="" class="header_a">我的淘寶 <i class="fa fa-angle-down"></i></a>
<a href=""><span class="fa fa-cart-plus"></span> 購(gòu)物車(chē)</a>
<a href="">收藏夾 <i class="fa fa-angle-down"></i></a>
<a href=""><span class="fa fa-star"></span> 商品分類(lèi)</a>
<a href="" class="header_a">賣(mài)家中心 <i class="fa fa-angle-down"></i></a>
<a href="" class="header_a">聯(lián)系客服 <i class="fa fa-angle-down"></i></a>
<a href="" class="header_a">網(wǎng)站導(dǎo)航 <i class="fa fa-angle-down"></i></a>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
Guru membetulkan:西門(mén)大官人Masa pembetulan:2019-04-27 17:40:20
Rumusan guru:代碼中有比較多的 建議用樣式直接處理。