Blogger Information
Blog 28
fans 0
comment 0
visits 13060
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
淘宝移动端首页的页眉
手机用户1594223549
Original
332 people have browsed it

一.淘宝移动端首页

pc端实在不会写,基础太差,目前阶段只能照猫画猫,我在复习复习

1.效果图

2.代码部分

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>淘宝手机版</title>
  8. <link rel="stylesheet" href="css/reset.css" />
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. }
  15. header,footer {
  16. height: 50px;
  17. position: fixed;
  18. }
  19. header {
  20. top: 0;
  21. left: 0;
  22. right: 0;
  23. z-index: 1;
  24. }
  25. main {
  26. min-height: 2000px;
  27. /* overflow: hidden; */
  28. position: relative;
  29. top: 50px;
  30. }
  31. footer {
  32. background-color: yellowgreen;
  33. left: 0;
  34. right: 0;
  35. bottom: 0;
  36. }
  37. /* 页眉布局 */
  38. header {
  39. display: grid;
  40. grid-template-columns: 0.58rem 1fr 0.33rem;
  41. grid-template-rows: 0.5rem;
  42. place-items: center;
  43. gap: 0.1rem;
  44. }
  45. header a.logo {
  46. padding-left: 0.1rem;
  47. }
  48. header a.search {
  49. width: 100%;
  50. border: 1.5px solid #ff5000;
  51. height: 0.31rem;
  52. border-radius: 0.3rem;
  53. display: flex;
  54. place-content: space-between;
  55. place-items: center;
  56. }
  57. header a.search > span:first-of-type {
  58. padding-left: 0.1rem;
  59. }
  60. header a.search > span:last-of-type {
  61. background: linear-gradient(to left, #ff5000, #ffc000);
  62. color: white;
  63. padding: 0.04rem 0.2rem;
  64. border-radius: 0.3rem;
  65. margin-right: 0.03rem;
  66. }
  67. header a.iconfont {
  68. font-size: large;
  69. }
  70. </style>
  71. </head>
  72. <body>
  73. <!-- 首页 -->
  74. <header>
  75. <a class=”logo“ href="https://m.taobao.com"><img src="images/nav/logo.png" alt="缓存中"></a>
  76. <a href="" class="search">
  77. <span>寻找宝贝店铺</span>
  78. <span>搜索</span>
  79. </a>
  80. <a href="" class="iconfont"><img src="images/nav/qiandao.png" alt="缓存中"></a>
  81. </header>
  82. <!-- 主体 -->
  83. <main>主体</main>
  84. <!-- 页脚 -->
  85. <footer>页脚</footer>
  86. </body>
  87. </html>
Correcting teacher:PHPzPHPz

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