Blogger Information
Blog 13
fans 0
comment 0
visits 10315
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
1220首页
Original
652 people have browsed it
HTML部分
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <!-- 引入图标库 -->
  8. <link rel="stylesheet" href="static/font/iconfont.css">
  9. <link rel="stylesheet" href="index.css">
  10. <title>1220作业</title>
  11. </head>
  12. <body>
  13. <div class="header">
  14. <!--logo 搜索框 快速入口-->
  15. <div class="top">
  16. <div class="logo">
  17. <a href=""><img src="static/images/logo.png" alt=""></a>
  18. </div>
  19. <div class="search">
  20. <input id="search">
  21. <label for="search" class="iconfont icon-jinduchaxun"></label>
  22. </div>
  23. <div class="shortcut">
  24. <a href="" class="iconfont icon-huiyuan1"></a>
  25. <a href="" class="iconfont icon-danmu1"></a>
  26. <a href="" class="iconfont icon-fabu"></a>
  27. <a href="" class="iconfont icon-fangda"></a>
  28. <a href="" class="iconfont icon-huiyuan2"></a>
  29. <a href="" class="iconfont icon-dianzan"></a>
  30. </div>
  31. </div>
  32. <!--主导航-->
  33. <div class="nav">
  34. <div class="nav-class">
  35. <span class="iconfont icon-DOC"></span>
  36. <div class="title">
  37. <span>资讯</span>
  38. <span>学习</span>
  39. </div>
  40. <div class="links">
  41. <a href="">器材</a>
  42. <a href="">大师</a>
  43. <a href="">学院</a>
  44. <a href="">实战</a>
  45. <a href="">大赛</a>
  46. <a href="">裤子</a>
  47. <a href="">影视</a>
  48. <a href="">其它</a>
  49. </div>
  50. </div>
  51. <div class="nav-class">
  52. <span class="iconfont icon-DOC"></span>
  53. <div class="title">
  54. <span>爱好</span>
  55. <span>姐妹</span>
  56. </div>
  57. <div class="links">
  58. <a href="">有品</a>
  59. <a href="">图片</a>
  60. <a href="">喝水</a>
  61. <a href="">飞机</a>
  62. <a href="">坦克</a>
  63. <a href="">气球</a>
  64. <a href="">毛线</a>
  65. <a href="">其它</a>
  66. </div>
  67. </div>
  68. <div class="nav-class">
  69. <span class="iconfont icon-DOC"></span>
  70. <div class="title">
  71. <span>软件</span>
  72. <span>技能</span>
  73. </div>
  74. <div class="links">
  75. <a href="">学习</a>
  76. <a href="">爱国</a>
  77. <a href="">敬业</a>
  78. <a href="">友善</a>
  79. <a href="">富强</a>
  80. <a href="">互助</a>
  81. <a href="">仁义</a>
  82. <a href="">其它</a>
  83. </div>
  84. </div>
  85. <div class="nav-class">
  86. <span class="iconfont icon-DOC"></span>
  87. <div class="title">
  88. <span>编程</span>
  89. <span>美女</span>
  90. </div>
  91. <div class="links">
  92. <a href="">吃饭</a>
  93. <a href="">周易</a>
  94. <a href="">黄山</a>
  95. <a href="">合肥</a>
  96. <a href="">上海</a>
  97. <a href="">杭州</a>
  98. <a href="">北京</a>
  99. <a href="">其它</a>
  100. </div>
  101. </div>
  102. </div>
  103. <!--轮播-->
  104. <div class="slider-ads">
  105. <a href=""><img src="static/images/2.jpg" alt=""></a>
  106. <a href=""><img src="static/images/banner-right.jpg" alt=""></a>
  107. </div>
  108. </div>
  109. </body>
  110. </html>
css部分
  1. a {
  2. color: black;
  3. }
  4. /*顶部*/
  5. .header > .top {
  6. height: 70px;
  7. }
  8. /*搜索框*/
  9. .header > .top > .search {
  10. width: 430px;
  11. position: absolute;
  12. top: 0;
  13. right: 350px;
  14. }
  15. /*按钮*/
  16. .header > .top > .shortcut {
  17. width: 300px;
  18. position: absolute;
  19. top: 0;
  20. right: 0;
  21. }
  22. .header > .top > .search > input {
  23. width: 330px;
  24. height: 40px;
  25. }
  26. /*放大镜*/
  27. .header > .top > .search > input + label {
  28. font-size: 23px;
  29. margin-left: -30px;
  30. }
  31. .header > .top > .shortcut > a {
  32. font-size: 33px;
  33. }
  34. /*导航*/
  35. .header > .nav {
  36. height: 44px;
  37. }
  38. .header > .nav > .nav-class {
  39. width: 300px;
  40. height: inherit;
  41. position: relative;
  42. float: left;
  43. }
  44. .header > .nav > .nav-class > .iconfont {
  45. font-size: 40px;
  46. color: red;
  47. position: absolute;
  48. }
  49. .header > .nav > .nav-class > .title {
  50. width: 40px;
  51. position: absolute;
  52. left: 45px;
  53. border-right: 1px solid #cdcdcd;
  54. }
  55. .header > .nav > .nav-class > .links {
  56. width: 200px;
  57. position: absolute;
  58. left: 100px;
  59. }

对CSS不熟,参考而来,很多不会调,还是要多练
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
0 comments
Author's latest blog post