摘要:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>布局演練</title><link rel="stylesheet" type="text/css" href="8.css"&g
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>布局演練</title>
<link rel="stylesheet" type="text/css" href="8.css">
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
<!--http://fontawesome.dashgame.com/-->
</head>
<body>
<div>
<div>
<div>
<a href="#">中國大陸 <i class="fa fa-angle-down"></i></a>
<a href="#" style="color: #ff5723;">親,請登錄</a>
<a href="#">免費注冊</a>
<a href="">手機逛淘寶</a>
</div>
<div>
<a href="#">我的淘寶 <i class="fa fa-angle-down"></i></a>
<a href="#"><span class="fa fa-cart-plus" style="color:#ff5723;"></span> 購物車<span style="color: #ff5723;font-weight: bold;">0</span></a>
<a href="#"><span class="fa fa-star"></span> 收藏夾 <i class="fa fa-angle-down"></i></a>
<a href="#">商品分類</a>
<a href="#">賣家中心 <i class="fa fa-angle-down"></i></a>
<a href="#">聯(lián)系客服 <i class="fa fa-angle-down"></i></a>
<a href="#">網(wǎng)站導航 <i class="fa fa-angle-down"></i></a>
</div>
</div>
<div></div>
</div>
</body>
</html>
CSS樣式如下:
*{margin: 0px;padding: 0px;}/* 清除瀏覽器默認的和margin和padding邊距屬性*/
.header{width: 100%; height: 40px; background-color: #f5f5f5;font-size: 12px;}
.header_content{width: 1200px;height: 40px;margin: 0px auto;line-height: 40px;}
.header_content a{color: #9c9c9c;}
.header_content a:hover{color: #ff5000;}
.header_left{height: 40px;float: left;}
.header_left a{margin-left: 5px;}
.header_right{width: 600px;height: 40px;float: right;}
.clear{clear:both;}/*清除float浮動*/
a{text-decoration: none;color: #000;}
.header_a{display: inline-block;height: 40px;width: 90px;text-align: center;}
.header_a:hover{background-color: #fff;}
批改老師:滅絕師太批改時間:2019-01-18 14:54:47
老師總結:完成的不錯,布局中有字體和圖片老師看不到你的具體效果,下次作業(yè)附帶上作業(yè)完成圖片喲!