Blogger Information
Blog 14
fans 2
comment 1
visits 8047
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
仿小米商城移动端
梦想
Original
808 people have browsed it

仿小米商城移动端

实例演示

  1. <header>
  2. <!-- logo -->
  3. <a href=""><img src="images/icon-header-logo3.ddf2a1c313.png" alt=""></a>
  4. <!-- 搜索框 -->
  5. <a href="" class="so">
  6. <span class="iconfont icon-wode-wode"></span>
  7. <span>搜索商品名称</span>
  8. </a>
  9. <!-- 我的 -->
  10. <a href="" class="iconfont icon-wode-wode"></a>
  11. <!-- 导航下部 -->
  12. <div class="bottom">
  13. <a href="">推荐</a>
  14. <a href="">智能</a>
  15. <a href="">电视</a>
  16. <a href="">家电</a>
  17. <a href="">笔记本</a>
  18. </div>
  19. </header>
  20. <!-- 主体 -->
  21. <main>
  22. <!-- 轮番图 -->
  23. <a href=""><img src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/89fbb601177fec95fd14af5a9cc257e0.jpg?thumb=1&w=720&h=360" class="banner"></a>
  24. <!-- 顶部导航 -->
  25. <div class="mainnavs">
  26. <a href="">
  27. <img src="images/shop.webp" alt="">
  28. </a>
  29. <a href="">
  30. <img src="images/zhong.webp" alt="">
  31. </a>
  32. <a href="">
  33. <img src="images/shouji.webp" alt="">
  34. </a>
  35. <a href="">
  36. <img src="images/huanxin.webp" alt="">
  37. </a>
  38. <a href="">
  39. <img src="images/shangxin.webp" alt="">
  40. </a>
  41. <a href="">
  42. <img src="images/zhineng.webp" alt="">
  43. </a>
  44. <a href="">
  45. <img src="images/bijiben.png" alt="">
  46. </a>
  47. <a href="">
  48. <img src="images/dianshi.png" alt="">
  49. </a>
  50. <a href="">
  51. <img src="images/xiyiji.webp" alt="">
  52. </a>
  53. <a href="">
  54. <img src="images/mifenka.png" alt="">
  55. </a>
  56. </div>
  57. <!-- 快速入口 -->
  58. <div class="kuaisu">
  59. <a href=""><img src="images/k50.webp" alt=""></a>
  60. <a href=""><img src="images/xiaomiwatch.webp" alt=""></a>
  61. <a href=""><img src="images/ea50.webp" alt=""></a>
  62. </div>
  63. <a href=""><img src="images/k40s.webp" alt=""></a>
  64. <!-- 手机列表 -->
  65. <div class="shouji">
  66. <a href="">
  67. <img src="images/k50dj.jpg" alt="">
  68. <span>K50 电竞版</span>
  69. <span>全线拉满的冷血旗舰</span>
  70. <span style="color: #ee7f79;">¥3299起</span>
  71. <button class="buy">立即购买</button>
  72. </a>
  73. <a href="">
  74. <img src="images/k50dj.jpg" alt="">
  75. <span>K50 电竞版</span>
  76. <span>全线拉满的冷血旗舰</span>
  77. <span style="color: #ee7f79;">¥3299起</span>
  78. <button class="buy">立即购买</button>
  79. </a>
  80. <a href="">
  81. <img src="images/k50dj.jpg" alt="">
  82. <span>K50 电竞版</span>
  83. <span>全线拉满的冷血旗舰</span>
  84. <span style="color: #ee7f79;">¥3299起</span>
  85. <button class="buy">立即购买</button>
  86. </a>
  87. <a href="">
  88. <img src="images/k50dj.jpg" alt="">
  89. <span>K50 电竞版</span>
  90. <span>全线拉满的冷血旗舰</span>
  91. <span style="color: #ee7f79;">¥3299起</span>
  92. <button class="buy">立即购买</button>
  93. </a>
  94. <a href="">
  95. <img src="images/k50dj.jpg" alt="">
  96. <span>K50 电竞版</span>
  97. <span>全线拉满的冷血旗舰</span>
  98. <span style="color: #ee7f79;">¥3299起</span>
  99. <button class="buy">立即购买</button>
  100. </a>
  101. <a href="">
  102. <img src="images/k50dj.jpg" alt="">
  103. <span>K50 电竞版</span>
  104. <span>全线拉满的冷血旗舰</span>
  105. <span style="color: #ee7f79;">¥3299起</span>
  106. <button class="buy">立即购买</button>
  107. </a>
  108. <a href="">
  109. <img src="images/k50dj.jpg" alt="">
  110. <span>K50 电竞版</span>
  111. <span>全线拉满的冷血旗舰</span>
  112. <span style="color: #ee7f79;">¥3299起</span>
  113. <button class="buy">立即购买</button>
  114. </a>
  115. <a href="">
  116. <img src="images/k50dj.jpg" alt="">
  117. <span>K50 电竞版</span>
  118. <span>全线拉满的冷血旗舰</span>
  119. <span style="color: #ee7f79;">¥3299起</span>
  120. <button class="buy">立即购买</button>
  121. </a>
  122. </div>
  123. <div class="gengduo">
  124. <a href="" style="text-align: center;">更多小米手机产品&gt;</a>
  125. </div>
  126. <!-- 小米电视 -->
  127. <div class="dianshi">
  128. <a href="">
  129. <img src="images/dianshi1.webp" alt="">
  130. </a>
  131. </div>
  132. <div class="gengduo">
  133. <a href="" style="text-align: center;">更多小米电视产品&gt;</a>
  134. </div>
  135. <!-- 小米笔记本 -->
  136. <div class="mpc">
  137. <a href="">
  138. <img src="images/bijiben/banner.webp" alt="">
  139. </a>
  140. <div class="pc">
  141. <a href="">
  142. <img src="images/bijiben/redmibookpro14.jpg" alt="">
  143. <span>RedmiBook Pro 14</span>
  144. <span>2.5k超视网膜全面屏</span>
  145. <span style="color: #ee7f79;">¥4999起</span>
  146. <button class="buy">立即购买</button>
  147. </a>
  148. <a href="">
  149. <img src="images/bijiben/redmibookpro15.jpg" alt="">
  150. <span>RedmiBook Pro 15</span>
  151. <span>3.2k超视网膜全面屏</span>
  152. <span style="color: #ee7f79;">¥5299起</span>
  153. <button class="buy">立即购买</button>
  154. </a>
  155. <a href="">
  156. <img src="images/bijiben/xiaomi15pro.jpg" alt="">
  157. <span>小米笔记本Pro 15</span>
  158. <span>2.5k超视网膜全面屏</span>
  159. <span style="color: #ee7f79;">¥4999起</span>
  160. <button class="buy">立即购买</button>
  161. </a>
  162. <a href="">
  163. <img src="images/bijiben/xiaomi14pro.jpg" alt="">
  164. <span>小米笔记本Pro 14</span>
  165. <span>2.5k超视网膜全面屏</span>
  166. <span style="color: #ee7f79;">¥4999起</span>
  167. <button class="buy">立即购买</button>
  168. </a>
  169. </div>
  170. </div>
  171. <div class="gengduo">
  172. <a href="" style="text-align: center;">更多小米笔记本产品&gt;</a>
  173. </div>
  174. <a href="">
  175. <img src="images/zhineng1.webp" alt="">
  176. </a>
  177. <div class="gengduo">
  178. <a href="" style="text-align: center;">更多米家家电产品&gt;</a>
  179. </div>
  180. <div class="gengduo">
  181. <a href="" style="text-align: center;">更多米家只能产品&gt;</a>
  182. </div>
  183. <!-- 底部快速入口 -->
  184. <div class="bottom">
  185. <a href="">
  186. <img src="images/bottom/xuexi.webp" alt="">
  187. </a>
  188. <a href="">
  189. <img src="images/bottom/jiating.webp" alt="">
  190. </a>
  191. <a href="">
  192. <img src="images/bottom/lvxing.webp" alt="">
  193. </a>
  194. <a href="">
  195. <img src="images/bottom/yinyue.webp" alt="">
  196. </a>
  197. <a href="">
  198. <img src="images/bottom/xinjia.webp" alt="">
  199. </a>
  200. <a href="">
  201. <img src="images/bottom/sheji.webp" alt="">
  202. </a>
  203. </div>
  204. <div>
  205. <a href="">
  206. <img src="images/bottom/huanxin.webp" alt="">
  207. </a>
  208. </div>
  209. <div class="xm">
  210. <a href="">了解小米</a>
  211. </div>
  212. <div class="app">
  213. <a href="" style="color: white;">
  214. <span>来APP领新人礼包</span></a>
  215. </div>
  216. </main>
  217. <!-- 页脚-->
  218. <footer>
  219. <a href="">
  220. <span class="iconfont icon-shouye-shouye"></span>
  221. <span>首页</span>
  222. </a>
  223. <a href="">
  224. <span class="iconfont icon-fenlei"></span>
  225. <span>分类</span>
  226. </a>
  227. <a href="">
  228. <span class="iconfont icon-quanzi"></span>
  229. <span>米圈</span>
  230. </a>
  231. <a href="">
  232. <span class="iconfont icon-gouwuche"></span>
  233. <span>购物车</span>
  234. </a>
  235. <a href="">
  236. <span class="iconfont icon-wode-wode"></span>
  237. <span>我的</span>
  238. </a>
  239. </footer>

imdex.css

  1. @import url(reset.css);
  2. @import url(main.css);
  3. @import url(header.css);
  4. @import url(public.css);
  5. @import url(../font_icon/iconfont.css);

reser.css

  1. *{
  2. margin: 0;
  3. padding: 0;
  4. box-sizing: border-box;
  5. }
  6. a{
  7. text-decoration: none;
  8. color: #747474;
  9. }
  10. li{
  11. list-style: none;
  12. }
  13. html{
  14. font-size: calc(100vw / 3.75);
  15. }
  16. body{
  17. font-size: 0.13rem;
  18. color: #333;
  19. background-color: #f5f5f5;
  20. margin: auto;
  21. /* padding: 0 0.1rem; */
  22. overflow-y: auto;
  23. }
  24. body img{
  25. width: 100%;
  26. }
  27. @media (max-width:320px) {
  28. body{
  29. font-size: 12px;
  30. }
  31. }
  32. @media (min-width:640px) {
  33. body{
  34. font-size: 16px;
  35. }
  36. }

header.css

  1. header {
  2. display: grid;
  3. grid-template-columns: 0.3rem 1fr 0.5rem;
  4. place-items: center;
  5. padding: 0 0.1rem;
  6. }
  7. header .so {
  8. border: 1px solid rgb(121, 121, 121);
  9. height: 0.3rem;
  10. width: 80%;
  11. display: flex;
  12. border-radius: 0.03rem;
  13. place-items: center;
  14. background-color: white;
  15. padding-left: 0.15rem;
  16. color: #b2b2b2;
  17. }
  18. header .so .iconfont,
  19. header .iconfont {
  20. font-size: 0.15rem;
  21. padding-right: 0.1rem;
  22. }
  23. header .bottom {
  24. display: grid;
  25. grid-template-columns: repeat(5, 0.4rem);
  26. position: relative;
  27. left: 1.4rem;
  28. }

mian.css

  1. main{
  2. min-height: 3000px;
  3. padding-bottom: 0.5rem;
  4. margin-top: 0.5rem;
  5. }
  6. /* 轮番图 */
  7. main .banner{
  8. margin: 0.1rem 0;
  9. padding: 0.1rem 0;
  10. width: 100%;
  11. height: 2.875rem;
  12. }
  13. main .mainnavs{
  14. display: grid;
  15. grid-template-columns: repeat(5,1fr);
  16. position: relative;
  17. top: -0.5rem;
  18. gap: 0;
  19. }
  20. /* 快速入口 */
  21. main .kuaisu{
  22. display: grid;
  23. grid-template-columns: 1fr 1fr;
  24. gap: .05rem;
  25. }
  26. main .kuaisu > a:first-of-type{
  27. grid-row: span 2 ;
  28. }
  29. /* 手机、笔记本商品列表 */
  30. main .shouji,
  31. main .mpc .pc{
  32. display: grid;
  33. grid-template-columns: 1fr 1fr;
  34. place-items: center;
  35. /* border-bottom: 1px solid #cecece; */
  36. padding-bottom: 0.1rem;
  37. border-bottom: 1px solid #cecece;
  38. background-color: white;
  39. gap: .08rem;
  40. }
  41. main .shouji > a,
  42. main .mpc .pc > a{
  43. display: grid;
  44. place-items: center;
  45. padding-bottom: .1rem;
  46. }
  47. main .shouji button,
  48. main .mpc .pc button{
  49. border: none;
  50. outline: none;
  51. background-color: #ea625b;
  52. color: white;
  53. border-radius: 0.05rem;
  54. height: 0.3rem;
  55. width: 0.9rem;
  56. }
  57. /* 更多商品 */
  58. main .gengduo,
  59. main .xm{
  60. height: 50px;
  61. background-color: white;
  62. display: flex;
  63. place-content: center;
  64. place-items: center;
  65. font-size: larger;
  66. margin-bottom: 10px;
  67. }
  68. main .bottom{
  69. display: grid;
  70. grid-template-columns: 1fr 1fr;
  71. margin-bottom: .1rem;
  72. }
  73. main .app{
  74. background-color: #ff6700;
  75. color: white;
  76. font-size: larger;
  77. width: 180px;
  78. height: 50px;
  79. border-radius: 25px;
  80. display: flex;
  81. place-content: center;
  82. place-items: center;
  83. position: fixed;
  84. left: 120px;
  85. bottom: 60px;
  86. }

public.css

  1. header{
  2. width: 100vw;
  3. height: 0.7rem;
  4. background-color: #f2f2f2;
  5. }
  6. header{
  7. position: fixed;
  8. top: 0;
  9. left: 0;
  10. right: 0;
  11. z-index: 9;
  12. }
  13. /* 页尾 */
  14. footer{
  15. width: 100vw;
  16. height: 0.4rem;
  17. background-color: #f2f2f2;
  18. position: fixed;
  19. bottom: 0;
  20. left: 0;
  21. right: 0;
  22. z-index: 9;
  23. }
  24. footer {
  25. display: grid;
  26. grid-template-columns: repeat(5,1fr);
  27. place-content: space-around;
  28. place-items: center;
  29. }
  30. footer > a{
  31. display: grid;
  32. place-items: center;
  33. }
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