Blogger Information
Blog 87
fans 1
comment 0
visits 59145
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
移动端布局学习与 淘宝首页基本框架搭建
阿杰
Original
2310 people have browsed it

一、移动端布局

(1) 基本思路

  • 在移动端的页面布局,一般控制像素跟可视窗口来实现

(2)三种视口类型

  • 布局视口:又称Layout viewport,与设备无关, 通常默认980px,显示完整网页。
  • 视觉视口:又称visual viewport,与设备相关,用户手机屏幕可见部分,通过缩放查看全部
  • 理想视口:又称idea viewport,不必缩放就可查看全部,针对移动端进行布局

(3)解决移动端布局方案

  • 使用视口属性:

<meta name="viewport" content="width=device-width, initial-scale=1.0" />

  • 布局视图 = 视觉视图

width=device-width

  • 视觉视图 = 理想视图

initial-scale=1.0

二、淘宝首页基本整体架构

  • 头部
  1. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  2. <!-- 头部 -->
  3. <header>
  4. <!-- 顶部 -->
  5. <div class="top">
  6. <!-- logo -->
  7. <div class="logo iconfont icon-shejiaotubiao-08"></div>
  8. <!-- 搜索框 -->
  9. <div class="search">
  10. <div class="keys">
  11. <span class="iconfont icon-fangdajing"></span>
  12. <span>寻找宝贝店铺</span>
  13. </div>
  14. </div>
  15. </div>
  16. </header>

  • 主体
  1. <!-- 轮播图 -->
  2. <div class="slider">
  3. <a href=""><img src="images/banner/banner1.jpg" alt="" /></a>
  4. </div>
  5. <!-- 导航组 -->
  6. <ul class="nav">
  7. <li class="item">
  8. <a href=""><img src="images/nav/nav6.png" alt="" /></a>
  9. <a href="">天猫新品</a>
  10. </li>
  11. <li class="item">
  12. <a href=""><img src="images/nav/nav3.png" alt="" /></a>
  13. <a href="">今日爆款</a>
  14. </li>
  15. <li class="item">
  16. <a href=""><img src="images/nav/nav1.png" alt="" /></a>
  17. <a href="">天猫超市</a>
  18. </li>
  19. <li class="item">
  20. <a href=""><img src="images/nav/nav2.png" alt="" /></a>
  21. <a href="">充值中心</a>
  22. </li>
  23. <li class="item">
  24. <a href=""><img src="images/nav/nav5.png" alt="" /></a>
  25. <a href="">机票酒店</a>
  26. </li>
  27. <li class="item">
  28. <a href=""><img src="images/nav/nav8.png" alt="" /></a>
  29. <a href="">金币庄园</a>
  30. </li>
  31. <li class="item">
  32. <a href=""><img src="images/nav/nav7.png" alt="" /></a>
  33. <a href="">阿里拍卖</a>
  34. </li>
  35. <li class="item">
  36. <a href=""><img src="images/nav/nav4.png" alt="" /></a>
  37. <a href="">分类</a>
  38. </li>
  39. <li class="item">
  40. <a href=""><img src="images/nav/nav7.png" alt="" /></a>
  41. <a href="">阿里拍卖</a>
  42. </li>
  43. <li class="item">
  44. <a href=""><img src="images/nav/nav4.png" alt="" /></a>
  45. <a href="">分类</a>
  46. </li>
  47. </ul>

  • 底部
  1. <footer>
  2. <div class="item active">
  3. <a href="" class="iconfont icon-shejiaotubiao-44"></a>
  4. </div>
  5. <div class="item">
  6. <a href="" class="iconfont icon-gouwuche"></a>
  7. <a href="">购物车</a>
  8. </div>
  9. <div class="item">
  10. <a href="" class="iconfont icon-wodetaobao"></a>
  11. <a href="">我的淘宝</a>
  12. </div>
  13. </footer>

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