Blogger Information
Blog 18
fans 0
comment 0
visits 10854
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
12月20号导航作业
- 迷舍人
Original
572 people have browsed it

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>导航</title>
  6. <link rel="stylesheet" href="static/font/iconfont.css">
  7. <style>
  8. *{
  9. margin: 0px;
  10. padding: 0px;
  11. }
  12. .head{
  13. width: 80%;
  14. height: 100px;
  15. /*让logo 搜索框 图标 在同一高度显示*/
  16. line-height: 100px;
  17. /*居中*/
  18. margin:0 auto;
  19. /*清楚浮动*/
  20. overflow: hidden;
  21. }
  22. .head-logo{
  23. /*浮动*/
  24. float: left;
  25. }
  26. .head-ssk{
  27. /*浮动*/
  28. float: left;
  29. /*左边距*/
  30. margin-left: 300px;
  31. margin-right: 200px;
  32. /*绝对定位*/
  33. position: relative;
  34. }
  35. .head-tb .iconfont{
  36. /*设置字体大小*/
  37. font-size: 35px;
  38. color: #404040;
  39. }
  40. .head-ssk input{
  41. width: 150px;
  42. height: 30px;
  43. /*线条高度*/
  44. line-height: 40px;
  45. padding: 0 15px;
  46. /*边缘半径*/
  47. border-radius:10px;
  48. }
  49. .head-ssk span{
  50. /*绝对定位*/
  51. position: absolute;
  52. top: 0;
  53. right: 20px;
  54. }
  55. .nav{
  56. width: 80%;
  57. /*居中*/
  58. margin:0 auto;
  59. }
  60. .nav-tb{
  61. /*浮动*/
  62. float: left;
  63. }
  64. .nav-tb span {
  65. /*设置文字大小*/
  66. font-size: 50px;
  67. color: red;
  68. /*浮动*/
  69. float: left;
  70. }
  71. .nav-dh{
  72. /*竖杠*/
  73. border-left:3px solid rosybrown;
  74. /*浮动*/
  75. float: left;
  76. /*右边距*/
  77. margin-right: 40px
  78. }
  79. .nav-dh a{
  80. /*文字装饰*/
  81. text-decoration:none;
  82. color: #666666;
  83. }
  84. .tp{
  85. width: 80%;
  86. /*居中*/
  87. margin:0 auto;
  88. }
  89. .tp-1{
  90. /*浮动*/
  91. float: left;
  92. width: 79.9%;
  93. }
  94. .tp-2{
  95. /*浮动*/
  96. float: right;
  97. width: 20%;
  98. }
  99. .tp-1 img,.tp-2 img{
  100. width: 100%;
  101. height: 300px;
  102. }
  103. </style>
  104. </head>
  105. <body>
  106. <div class="head">
  107. <div class="head-logo">
  108. <!--logo图标-->
  109. <img src="static/images/logo.png" alt="">
  110. </div>
  111. <div class="head-ssk">
  112. <form>
  113. <!--搜索框-->
  114. <input type="text">
  115. <span class="iconfont icon-sousuo"></span>
  116. </form>
  117. </div>
  118. <div class="head-tb">
  119. <span class="iconfont icon-daohangshouye"></span>
  120. <span class="iconfont icon-moban"></span>
  121. <span class="iconfont icon-huiyuan"></span>
  122. <span class="iconfont icon-apache"></span>
  123. </div>
  124. </div>
  125. <nav>
  126. <ul>
  127. <div class="nav">
  128. <div class="nav-tb">
  129. <span class="iconfont icon-gongdan"></span>
  130. </div>
  131. </div>
  132. <div class="nav-dh">
  133. <p>
  134. <a href="#">建材</a>
  135. <a href="#">建材</a>
  136. <a href="#">建材</a>
  137. <a href="#">建材</a>
  138. </p>
  139. <p>
  140. <a href="#">黄油</a>
  141. <a href="#">黄油</a>
  142. <a href="#">黄油</a>
  143. <a href="#">黄油</a>
  144. </p>
  145. </div>
  146. </ul>
  147. <ul>
  148. <div class="nav">
  149. <div class="nav-tb">
  150. <span class="iconfont icon-gongdan"></span>
  151. </div>
  152. </div>
  153. <div class="nav-dh">
  154. <p>
  155. <a href="#">建材</a>
  156. <a href="#">建材</a>
  157. <a href="#">建材</a>
  158. <a href="#">建材</a>
  159. </p>
  160. <p>
  161. <a href="#">黄油</a>
  162. <a href="#">黄油</a>
  163. <a href="#">黄油</a>
  164. <a href="#">黄油</a>
  165. </p>
  166. </div>
  167. </ul>
  168. <ul>
  169. <div class="nav">
  170. <div class="nav-tb">
  171. <span class="iconfont icon-gongdan"></span>
  172. </div>
  173. </div>
  174. <div class="nav-dh">
  175. <p>
  176. <a href="#">建材</a>
  177. <a href="#">建材</a>
  178. <a href="#">建材</a>
  179. <a href="#">建材</a>
  180. </p>
  181. <p>
  182. <a href="#">黄油</a>
  183. <a href="#">黄油</a>
  184. <a href="#">黄油</a>
  185. <a href="#">黄油</a>
  186. </p>
  187. </div>
  188. </ul>
  189. <ul>
  190. <div class="nav">
  191. <div class="nav-tb">
  192. <span class="iconfont icon-gongdan"></span>
  193. </div>
  194. </div>
  195. <div class="nav-dh">
  196. <p>
  197. <a href="#">建材</a>
  198. <a href="#">建材</a>
  199. <a href="#">建材</a>
  200. <a href="#">建材</a>
  201. </p>
  202. <p>
  203. <a href="#">黄油</a>
  204. <a href="#">黄油</a>
  205. <a href="#">黄油</a>
  206. <a href="#">黄油</a>
  207. </p>
  208. </div>
  209. </ul>
  210. </nav>
  211. <div class="tp">
  212. <div class="tp-1">
  213. <img src="static/images/2.jpg">
  214. </div>
  215. <div class="tp-2">
  216. <img src="static/images/banner-right.jpg">
  217. </div>
  218. </div>
  219. </body>
  220. </html>
Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:html元素结构还行, css控制还要优化, 今晚会说
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