Blogger Information
Blog 19
fans 0
comment 1
visits 14055
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
flex 京东页眉 和 页脚
Original
901 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. <style>
  8. /* 重置公共样式 */
  9. * {
  10. padding: 0;
  11. margin: 0;
  12. box-sizing: border-box;
  13. }
  14. body{
  15. background-color:#f6f6f6 ;
  16. }
  17. a {
  18. text-decoration: none;
  19. color:#7b7b7b;
  20. }
  21. li{
  22. list-style:none;
  23. }
  24. html{
  25. font-size:10px;
  26. }
  27. @media screen and (min-width:300px){
  28. html{
  29. font-size: 5px;
  30. }
  31. }
  32. @media screen and (min-width:600px){
  33. html{
  34. font-size: 14px;
  35. }
  36. }
  37. @media screen and (min-width:800px){
  38. html{
  39. font-size: 20px;
  40. }
  41. }
  42. @charset 'UTF-8';
  43. @import 'reset.css';
  44. header {
  45. height: 4.4rem;
  46. background-color: #e43130;
  47. position:fixed;
  48. top:0;
  49. left:0;
  50. right: 0;
  51. z-index: 100;
  52. color:#ffffff;
  53. font-size:3rem;
  54. display: flex;
  55. align-items: center;
  56. text-align: center;
  57. }
  58. header .herder-icon-santiaoxian{
  59. text-align: center;
  60. flex:1;
  61. }
  62. header .herder-icon-santiaoxian .iconfont{
  63. font-size: 4rem;
  64. }
  65. header .logo-icon-work{
  66. flex:6;
  67. text-align: center;
  68. background-color: #ffffff;
  69. border-radius: 3rem;
  70. color:red;
  71. display: flex;
  72. align-items: center;
  73. padding: 0.5rem;
  74. }
  75. header .logo-icon-work .logo{
  76. flex:0 0 5rem;
  77. /* border: 1px solid red; */
  78. }
  79. header .logo-icon-work .iconfont{
  80. /* border: 1px solid red; */
  81. flex:0 0 4rem;
  82. text-align: 2.1rem;
  83. border-left:1px solid #ccc;
  84. color:#ccc;
  85. font-size:2rem;
  86. /* margin:0.4rem; */
  87. }
  88. header .logo-icon-work input{
  89. flex:auto;
  90. border: none;
  91. outline: none;
  92. color:#ccc;
  93. line-height: 2rem;
  94. }
  95. header .login{
  96. flex: 1;
  97. }
  98. header .login a{
  99. color:#ffffff;
  100. text-align: center;
  101. }
  102. main{
  103. position:absolute;
  104. top:4.4rem;
  105. left:0;
  106. right: 0;
  107. bottom:4.4rem;
  108. }
  109. footer{
  110. height: 4.4rem;
  111. background-color:#fafafa;
  112. box-shadow: 0 0 3px #999;
  113. position:fixed;
  114. bottom: 0;
  115. left: 0;
  116. right: 0;
  117. z-index: 100;
  118. color:#666;
  119. font-size: 1rem;
  120. display: flex;
  121. flex-direction: space-between;
  122. }
  123. footer div {
  124. flex:auto;
  125. align-items: center;
  126. justify-content: center;
  127. display: flex;
  128. text-align: center;
  129. }
  130. footer div .iconfont{
  131. font-size:2rem ;
  132. }
  133. footer div a{
  134. display: flex;
  135. flex-direction: column;
  136. text-align: center;
  137. }
  138. footer div:first-child a{
  139. color:#e43130;
  140. }
  141. </style>
  142. </head>
  143. <body>
  144. <!-- 页眉 -->
  145. <header>
  146. <div class='herder-icon-santiaoxian'><span class='iconfont icon-santiaoxian'></span></div>
  147. <div class='logo-icon-work'>
  148. <span class='logo'>JD</span>
  149. <span class='iconfont icon-sousuokuang'></span>
  150. <input type="work" value="笔记本硬盘">
  151. </div>
  152. <div class='login'>
  153. <a href="">登录</a>
  154. </div>
  155. </header>
  156. <!-- 主体 -->
  157. <main>
  158. </main>
  159. <!-- 页脚 -->
  160. <footer>
  161. <div>
  162. <a href="#">
  163. <span class="iconfont icon-jingdonglogo"></span>
  164. <span>首页</span>
  165. </a>
  166. </div>
  167. <div>
  168. <a href="#">
  169. <span class="iconfont icon-category"></span>
  170. <span>分类</span>
  171. </a>
  172. </div>
  173. <div>
  174. <a href="#">
  175. <span class="iconfont icon-laiyuanICON_fuzhi-06"></span>
  176. <span>京喜</span>
  177. </a>
  178. </div>
  179. <div>
  180. <a href="#">
  181. <span class="iconfont icon-che"></span>
  182. <span>购物车</span>
  183. </a>
  184. </div>
  185. <div>
  186. <a href="#">
  187. <span class="iconfont icon-denglu-1"></span>
  188. <span>未登录</span>
  189. </a>
  190. </div>
  191. </footer>
  192. </body>
  193. </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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!