abstrait:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>導(dǎo)航布局實戰(zhàn)</title> <style type="text/css"> *{margin: 0px;padding: 0px;} a{text-dec
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>導(dǎo)航布局實戰(zhàn)</title>
<style type="text/css">
*{margin: 0px;padding: 0px;}
a{text-decoration: none;color: #000;font-size: 13px;}
li{list-style: none;}
.clear{clear: both;}
#box{width: 100%;background-color: #F5F5F5;}
#box1{width: 1200px;margin: 0 auto;line-height: 40px;}
#box1 a:hover{color: #FF5000;}
.left{height: 40px;float: left;}
.left a{margin-right: 5px;}
.right{height: 40px;float: right;}
.right a{margin-right: 5px;}
.a{display: inline-block;height: 40px;width: 90px;text-align: center;position: r}
.a:hover{background-color: #FFF;}
.a ul{border: 1px solid #F5F5F5;display: none;border-top: none;}
.a:hover ul{display: block;position: absolute;}
.a ul li{color: #6c6c6c;height: 40px;line-height: 40px;text-align: left;width: 78px;padding: 0px 6px;}
.a ul li:hover{background-color: #F5F5F5;}
</style>
</head>
<body>
<div id="box">
<div id="box1">
<div class="left">
<a href="" class="a">中國大陸</a>
<a href="" style="color: #FF5000">親,請登錄</a>
<a href="">免費注冊</a>
<a href="">手機逛淘寶</a>
</div>
<div class="right">
<a href="" class="a">我的淘寶
<ul>
<li>我買到的寶貝</li>
<li>我的足跡</li>
</ul>
</a>
<a href="">購物車</a>
<a href="" class="a">收藏夾</a>
<a href="">商品分類</a>
<a href="" class="a">賣家中心</a>
<a href="" class="a">聯(lián)系客服</a>
<a href="" class="a">網(wǎng)站導(dǎo)航</a>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
Professeur correcteur:天蓬老師Temps de correction:2019-06-05 13:10:50
Résumé du professeur:清浮動可以有更好的方式:
<div class="clear"></div>, 不要用這種... 可以用偽類來做: after