Blogger Information
Blog 37
fans 0
comment 0
visits 34794
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
京东app首页页眉,页脚组件
手机用户1607314868
Original
1174 people have browsed it

京东首页页眉页脚代码


  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>京东首页模仿</title>
  7. <!-- 字体图标 -->
  8. <link rel="stylesheet" href="static/icon-font/iconfont.css">
  9. <style>
  10. *{
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. }
  15. li{
  16. list-style: none;
  17. }
  18. a{
  19. color: #7b7b7b;
  20. text-decoration: none;
  21. }
  22. body{
  23. background-color: #f6f6f6;
  24. }
  25. html{
  26. font-size: 10px;
  27. }
  28. /* 媒体查询 */
  29. @media screen and (min-width:480px){
  30. html{
  31. font-size: 12px;
  32. }
  33. }
  34. @media screen and (min-width:640px){
  35. html{
  36. font-size: 14px;
  37. }
  38. }
  39. @media screen and (min-width:720px){
  40. html{
  41. font-size: 16px;
  42. }
  43. }
  44. .header{
  45. background-color: #e43130;
  46. color: white;
  47. height: 4rem;
  48. /* 固定定位 */
  49. position: fixed;
  50. top: 0;
  51. left: 0;
  52. right: 0;
  53. z-index: 100;
  54. }
  55. .header{
  56. display: flex;
  57. align-items: center;
  58. }
  59. .header .menu{
  60. text-align: center;
  61. flex:1;
  62. font-size: 2.5rem;
  63. }
  64. .header .search{
  65. flex:6;
  66. background-color: #ffffff;
  67. padding: 0.5rem;
  68. border-radius: 3rem;
  69. display: flex;
  70. }
  71. .header .login{
  72. flex: 1;
  73. color:white;
  74. text-align: center;
  75. }
  76. .header .search .logo{
  77. color:#e43130;
  78. flex:0 1 4rem;
  79. text-align: center;
  80. line-height: 2rem;
  81. }
  82. .header .search .zoom{
  83. border-left: 1px solid;
  84. color:#ccc;
  85. flex:0 1 4rem;
  86. line-height: 2rem;
  87. text-align: center;
  88. }
  89. .header .search .words{
  90. color:#aaa;
  91. border: none;
  92. outline: none;
  93. }
  94. .main{
  95. /* 绝对定位 */
  96. position: absolute;
  97. top: 4.4rem;
  98. bottom: 4.4rem;
  99. left: 0;
  100. right: 0;
  101. }
  102. .footer{
  103. color:#666;
  104. background-color: #fafafa;
  105. height: 4.4rem;
  106. box-shadow: 0 0 3px #999;
  107. /* 固定定位 */
  108. position: fixed;
  109. bottom: 0;
  110. left: 0;
  111. right: 0;
  112. z-index: 100;
  113. }
  114. .footer{
  115. display: flex;
  116. justify-content: space-around;
  117. align-items: center;
  118. }
  119. .footer > div{
  120. display: flex;
  121. flex-flow: column nowrap;
  122. align-items: center;
  123. }
  124. .footer > div > .iconfont{
  125. font-size: 2rem;
  126. }
  127. .footer > div > span{
  128. font-size: 1rem;
  129. }
  130. </style>
  131. </head>
  132. <body>
  133. <div class="header">
  134. <div class="menu iconfont icon-menu"></div>
  135. <div class="search">
  136. <div class="logo">JD</div>
  137. <div class="zoom iconfont icon-search"></div>
  138. <input type="text" class="words" value="雷克萨斯">
  139. </div>
  140. <a href="" class="login">登录</a>
  141. </div>
  142. <div class="main">
  143. <ul class="nav">
  144. <!-- 第一组 -->
  145. <li>
  146. <a href=""><img src="static/images/dh/nav-1.png" alt=""></a>
  147. <a href="">京东超市</a>
  148. </li>
  149. <li>
  150. <a href=""><img src="static/images/dh/nav-2.png" alt=""></a>
  151. <a href="">京东超市</a>
  152. </li>
  153. <li>
  154. <a href=""><img src="static/images/dh/nav-3.png" alt=""></a>
  155. <a href="">京东超市</a>
  156. </li>
  157. <li>
  158. <a href=""><img src="static/images/dh/nav-4.png" alt=""></a>
  159. <a href="">京东超市</a>
  160. </li>
  161. <li>
  162. <a href=""><img src="static/images/dh/nav-5.png" alt=""></a>
  163. <a href="">京东超市</a>
  164. </li>
  165. <li>
  166. <a href=""><img src="static/images/dh/nav-6.png" alt=""></a>
  167. <a href="">京东超市</a>
  168. </li>
  169. <li>
  170. <a href=""><img src="static/images/dh/nav-7.png" alt=""></a>
  171. <a href="">京东超市</a>
  172. </li>
  173. <li>
  174. <a href=""><img src="static/images/dh/nav-8.png" alt=""></a>
  175. <a href="">京东超市</a>
  176. </li>
  177. <li>
  178. <a href=""><img src="static/images/dh/nav-9.png" alt=""></a>
  179. <a href="">京东超市</a>
  180. </li>
  181. <li>
  182. <a href=""><img src="static/images/dh/nav-10.png" alt=""></a>
  183. <a href="">京东超市</a>
  184. </li>
  185. </ul>
  186. <div class="ms">
  187. <div class="ms-top">
  188. <div class="left">
  189. <div class="title">京东秒杀</div>
  190. <div class="notice">
  191. <div class="tips">22点专场</div>
  192. <div class="times">01:11:22</div>
  193. </div>
  194. </div>
  195. <div class="right">更多秒杀</div>
  196. </div>
  197. <ul class="ms-body">
  198. <li class="item">
  199. <img src="static/images/ms/ms-1.jpg" alt="">
  200. <div class="iconfont icon-rmb">338</div>
  201. <div class="iconfont icon-rmb">558</div>
  202. </li>
  203. <li class="item">
  204. <img src="static/images/ms/ms-2.jpg" alt="">
  205. <div class="iconfont icon-rmb">338</div>
  206. <div class="iconfont icon-rmb">558</div>
  207. </li>
  208. <li class="item">
  209. <img src="static/images/ms/ms-3.jpg" alt="">
  210. <div class="iconfont icon-rmb">338</div>
  211. <div class="iconfont icon-rmb">558</div>
  212. </li>
  213. <li class="item">
  214. <img src="static/images/ms/ms-4.jpg" alt="">
  215. <div class="iconfont icon-rmb">338</div>
  216. <div class="iconfont icon-rmb">558</div>
  217. </li>
  218. </ul>
  219. </div>
  220. <!-- 推荐 -->
  221. <h3 class="title">猜你喜欢</h3>
  222. <ul class="tj">
  223. <li class="item">
  224. <a href=""><img src="static/images/sp/sp-1.webp" alt=""></a>
  225. <p>商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍</p>
  226. <div class="price">
  227. <div class="iconfont icon-rmb">203</div>
  228. <div>看相似</div>
  229. </div>
  230. </li>
  231. <li class="item">
  232. <a href=""><img src="static/images/sp/sp-2.webp" alt=""></a>
  233. <p>商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍</p>
  234. <div class="price">
  235. <div class="iconfont icon-rmb">203</div>
  236. <div>看相似</div>
  237. </div>
  238. </li>
  239. <li class="item">
  240. <a href=""><img src="static/images/sp/sp-3.webp" alt=""></a>
  241. <p>商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍</p>
  242. <div class="price">
  243. <div class="iconfont icon-rmb">203</div>
  244. <div>看相似</div>
  245. </div>
  246. </li>
  247. <li class="item">
  248. <a href=""><img src="static/images/sp/sp-4.webp" alt=""></a>
  249. <p>商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍商品介绍</p>
  250. <div class="price">
  251. <div class="iconfont icon-rmb">203</div>
  252. <div>看相似</div>
  253. </div>
  254. </li>
  255. <li class="item">
  256. <a href=""><img src="static/images/sp/sp-5.webp" alt=""></a>
  257. <p>商品介绍商品介绍商品介绍商品介绍</p>
  258. <div class="price">
  259. <div class="iconfont icon-rmb">203</div>
  260. <div>看相似</div>
  261. </div>
  262. </li>
  263. <li class="item">
  264. <a href=""><img src="static/images/sp/sp-6.webp" alt=""></a>
  265. <p>商品介绍商品介绍商品介绍商品介绍</p>
  266. <div class="price">
  267. <div class="iconfont icon-rmb">203</div>
  268. <div>看相似</div>
  269. </div>
  270. </li>
  271. </ul>
  272. </div>
  273. <div class="footer">
  274. <div>
  275. <div class="iconfont icon-home"> </div>
  276. <span>主页</span>
  277. </div>
  278. <div>
  279. <div class="iconfont icon-layers"> </div>
  280. <span>分类</span>
  281. </div>
  282. <div>
  283. <div class="iconfont icon-layers"> </div>
  284. <span>京喜</span>
  285. </div>
  286. <div>
  287. <div class="iconfont icon-shopping-cart"> </div>
  288. <span>购物车</span>
  289. </div>
  290. <div>
  291. <div class="iconfont icon-user"> </div>
  292. <span>主页</span>
  293. </div>
  294. </div>
  295. </body>
  296. </html>
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