Blogger Information
Blog 5
fans 0
comment 2
visits 3066
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
2019年12月25日作业
Herry.
Original
616 people have browsed it

课堂笔记



导航顶部Html代码
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <link rel="stylesheet" href="../../../static/font/iconfont.css">
  6. <link rel="stylesheet" href="public-header.css">
  7. <title>全栈头部导航</title>
  8. </head>
  9. <body>
  10. <div class="public-header">
  11. <a href="">网站首页</a>
  12. <a href="">专题</a>
  13. <a href="">二手商品</a>
  14. <a href="">讨论区</a>
  15. <span>
  16. <a href=""><i class="iconfont icon-huiyuan2"></i>登录</a>
  17. <a href="">快速注册</a>
  18. </span>
  19. </div>
  20. </body>
  21. </html>
初始化组件CSS代码
  1. /*初始化组件*/
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. /*outline: 1px dashed red;!*参考线*!*/
  6. }
  7. bdoy {
  8. font-size: 15px;
  9. color: #666666;
  10. background-color: #efefef;
  11. }
  12. a {
  13. text-decoration: none;/*去掉下划线*/
  14. color: #404040;
  15. font-size: 15px;
  16. }
  17. li {
  18. list-style: none;/*去掉标签前面的小黑点*/
  19. }​
头部导航CSS代码
  1. /*导入元素的公共初始化样式表*/
  2. /*@import "../../public/public_reset.css";二者可互用*/
  3. @import url(../public_reset.css);
  4. /*全栈头部导航*/
  5. .public-header {
  6. height: 44px;
  7. background-color: black;
  8. padding: 0 20px;/*文字不靠边*/
  9. /*转为弹性布局*/
  10. display: flex;
  11. flex-flow: row nowrap;/*水平不换行*/
  12. }
  13. .public-header a {
  14. line-height: 44px;
  15. color: #cccccc;
  16. padding: 0 10px;
  17. }
  18. .public-header > a:hover {
  19. background-color: #fff;
  20. color: black;
  21. }
  22. .public-header > span {
  23. margin-left: auto;/*尽可能将左侧剩余都给右侧*/
  24. }
  25. /*字体图标*/
  26. .public-header > span i {
  27. font-size: 16px;
  28. color: #cccccc;
  29. padding-right: 15px;
  30. }​
Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:这些属性手写可能并不能完全记住 , 还要在项目中不断的去用它, 学了就要用呀, 尽可能用新技术, 人不能总活在记忆中...
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
1 comments
Herry. 2019-12-30 10:31:07
因为学起来有些吃力 我现在尽可能的多看几遍教程 多熟悉一下代码的含义 然后在实战中进行运用
1 floor
Author's latest blog post