导航布局案例及总结

Original 2018-11-29 19:33:33 225
abstract:<!DOCTYPE html> <html> <head>          <meta charset="uft-8">         &
<!DOCTYPE html>
<html>
<head>
         <meta charset="uft-8">
         <title>导航条案例-淘宝网</title>
         <link rel="stylesheet" type="text/css" href="css/index1.css">
         <link rel="stylesheet" type="text/css" href="css/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<div>
         <div>
            <div>
                       <a href="" style="color:#000;">中国大陆 &nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
                       <a href="" style="color:#F22E00;">亲,请登陆</a>
                       <a href="">免费注册</a>
                       <a href="">手机逛淘宝</a>
            </div>
            <div>
                       <a href=""> 我的淘宝&nbsp;&nbsp; <i class="fa fa-angle-down"></i></a>
                       <a href=""><span class="fa fa-shopping-cart" style="color:#FF4400;">&nbsp;</span>购物车&nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
                       <a href=""><span class="fa fa-star">&nbsp;</span>收藏夹&nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
                       <a href="">商品分类</a>
                       <a href="">卖家中心&nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
                       <a href="">联系客服&nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
                       <a href="" ><span class="fa fa-bars" style="color:#FF4400;">&nbsp;</span>网站导航&nbsp;&nbsp;<i class="fa fa-angle-down"></i></a>
            </div>
            <div></div>
         </div>
</body>
</html>
*{margin: 0px;padding: 0px;}
a{text-decoration: none;color: #6C6C6C;font-size: 13px;}
.clear{clear: both;}
.header{width: 100%;background-color:#F5F5F5;}
.header_content{width:1200px;margin:0px auto;line-height: 40px;}
.header_left{height: 40px;float: left;}
.header_left a{margin-right:5px; }
.header_content a:hover{color:#F22E00;}
.header_right{height: 40px;float: right;}
.header_a{display: inline-block; width:90px;height: 40px;text-align: center;}
.header_a:hover{background-color: #fff;}

总结:

字体库的引用

块级元素和行内元素的转化

display的正确运用

Correcting teacher:灭绝师太Correction time:2018-11-30 09:11:43
Teacher's summary:布局时带有二级下拉菜单的导航不建议用a嵌套,可以使用无序列表

Release Notes

Popular Entries