abstract:總結(jié):用ul與li做下拉 菜單,先隱藏,然后用hover選擇時(shí)顯示出來。<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>淘寶</title> <link r
總結(jié):用ul與li做下拉 菜單,先隱藏,然后用hover選擇時(shí)顯示出來。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>淘寶</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="shortcut icon " type="image/x-icon" href="">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<style type="text/css">
*{margin: 0px;padding: 0px;}
a{text-decoration: none;color: #6c6c6c;font-size: 13px;}
li{list-style: none;}
.clear{clear: both;}
.header{width: 100%;background-color: #f5f5f5;}
.header_content{width: 1000px;margin: 0 auto;text-align: center;height: 40px;line-height: 40px;}
.header_left{height: 40px;/*background-color: pink;*/ float: left;}
.header_left a{margin-right: 5px;}
.header_content a:hover{color: $FF5000;}
.header_right{width: 600px;height: 40px;float: right;}
.header_a{display: inline-block;height: 40px;width: 90px;text-align: center;position: relative;}
.header_a:hover{background-color: #fff;}
.header_a ul{border: 1px solid #f6f6f6;display: none;border-top: none;}
.header_a:hover ul{display: block;position: absolute; width: 89px;}
.header_a ul li:hover{background:#f6f6f6; }
.header_a ul li{color: #6c6c6c;height: 30px;line-height: 30px;text-align: left;padding: 0 3px;margin: 5px 0;}
</style>
</head>
<body>
<div class="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>
<ul>
<li>我已買的寶貝</li>
<li>我的足跡</li>
</ul>
</a>
<a href=""><span class="fa fa-cart-plus" style="color: #ff5000;"></span> 購(gòu)物車</a>
<a href="" class="header_a">收藏夾<i class="fa fa-angle-down"></i>
<ul>
<li>我已買的寶貝</li>
<li>我的足跡</li>
</ul>
</a>
<a href="">商品分類</a>
<a href="" class="header_a">賣家中心<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"><span class="fa fa-fa-align-justify" style="color: #ff5000;"></span>網(wǎng)站導(dǎo)航<i class="fa fa-angle-down"></i></a>
</div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
Correcting teacher:查無此人Correction time:2019-04-19 09:04:59
Teacher's summary:完成的不錯(cuò)??梢园殉S玫腸ss樣式,寫到公用文件里,方便每次使用。繼續(xù)加油。