对本课程理解的代码标注

Original 2018-11-13 15:29:34 188
abstract:<!DOCTYPE html><html>   <head>      <title>天猫精选-上天猫,就够了</title>      <meta charset="utf-8">      <lin

<!DOCTYPE html>
<html>
  <head>
     <title>天猫精选-上天猫,就够了</title>
     <meta charset="utf-8">
     <link href="static/css/style.css" rel="stylesheet" type="text/css">
             <link rel="shortcut icon"  href="static/images/logo1.png" type="image/x-icon" />
         <link href="static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> 

<style type="text/css">

  *{margin: 0px; padding: 0px;}
  /*清除浏览器默认内外边距*/
  a{text-decoration: none;color: #000;font-size: 13px;}
  /*a标签默认样式重设*/
  .clear{clear: both}
  /*清除浮动,如果父容器不设定高度,其高度由子容器高度进行撑开。*/
  /*子容器设定浮动属性图例文档流,则会出现父容器『坍塌』的情况*/
  /*通过空div与clear属性的设定使父容器『被撑开』*/

  .header{width: 100%; background: #f5f5f5;}
  /*导航总体局部容器*/
  .header_content{width: 1200px; margin: 0px auto; line-height: 40px;}
  /*导航内容容器 定宽width: 1200px | 容器水平居中 | height: 40px& line-height: 40px 文字内容纵向居中*/
  .header_left{height: 40px;float: left;}
  .header_left a{margin-right: 5px;}
  /*左子容器a标签之间的横向边距*/
  .header_content a:hover{color: #FF5000;}
  /*悬浮在a标签上字体变橙*/
  .header_right{height: 40px;width: 600px;float: right;}
  .header_a{display: inline-block;height: 40px; width: 90px;text-align: center;}
  /*a为行内元素,宽高属性设定不生效。通过display: inline_block设定为行内块元素即可设定宽高*/
  /*带有小箭头的a标签单独设立为一个容器设定样式*/
  .header_a:hover{background: #fff;}
  /*悬浮在a标签上背景变白*/
</style>


  </head>
  <body>
<!-- 头部导航 -->
      <div class="header">
        <div class="header_content">
           <div class="header_left">
              <!--通过&nbsp;控制小间距-->
              <a href="" class="header_a">中国大陆 &nbsp; &nbsp;<i class="fa fa-angle-down"></i></a>
              <a href="" style="color: #ff5000">亲,请登录</a>
              <a href="">免费注册</a>
              <a href="">手机逛淘宝</a>
           </div>
           <div class="header_right">
              <!--span或i引入图标样式,两者只作为传导载体-->
              <a href="" class="header_a">我的淘宝 <i class="fa fa-angle-down"></i></a>
              <a href=""><span class="fa fa-cart-plus"></span>&nbsp; &nbsp;购物车</a>
              <a href=""><span class="fa fa-star"></span>&nbsp; &nbsp;收藏夹 <i class="fa fa-angle-down"></i></a>
              <a href="">商品分类</a>
              <a href="" class="header_a">卖家中心 <i class="fa fa-angle-down"></i></a>
              <a href="" class="header_a">联系客服 <i class="fa fa-angle-down"></i></a>
              <a href="" class="header_a">网站导航 <i class="fa fa-angle-down"></i></a>
           </div>
        </div>
        <div class="clear"></div>
     </div>
  </body>
</html>



Correcting teacher:灭绝师太Correction time:2018-11-13 15:33:11
Teacher's summary:虽然注释繁琐,但是便于理解,继续加油完成的不错

Release Notes

Popular Entries