博主信息
可乐
博文
12
粉丝
0
评论
0
访问量
376
积分:0
P豆:28

移动端网站(前端页面)

2021年10月03日 18:35:30阅读数:42博客 / 可乐

HTML

  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="index.css" />
  9. <script src="iconfont.js"></script>
  10. </head>
  11. <div>
  12. <!--菜单栏-->
  13. <div class="home-a">
  14. <div class="header-a">
  15. <li>
  16. <a href="">
  17. <svg class="icon" aria-hidden="true">
  18. <use xlink:href="#icon-didiandingwei"></use>
  19. </svg> </a>地址
  20. </li>
  21. <svg class="icon" aria-hidden="true">
  22. <use xlink:href="#icon-mianbao"></use>
  23. </svg>
  24. <a href="">登录用户</a>
  25. </div>
  26. <div class="search">
  27. <a href="">
  28. <svg class="icon" aria-hidden="true">
  29. <use xlink:href="#icon-sousuo"></use>
  30. </svg>
  31. <form action="">
  32. <input type="search" name="search" value="荞麦面包" />
  33. </form>
  34. </a>
  35. </div>
  36. </div>
  37. <div class="main">
  38. <!--导航-->
  39. <div class="navs">
  40. <a href="" class="icon-a">
  41. <img src="nav/jingxuanshipin.png" alt="" class="icon-b" />
  42. <div class="txt">精选</div>
  43. </a>
  44. <a href="" class="icon-a">
  45. <img src="nav/mianbao.png" alt="" class="icon-b" />
  46. <div class="txt">面包</div>
  47. </a>
  48. <a href="" class="icon-a">
  49. <img src="nav/tianpin.png" alt="" class="icon-b" />
  50. <div class="txt">甜品</div>
  51. </a>
  52. <a href="" class="icon-a">
  53. <img src="nav/guozhi.png" alt="" class="icon-b" />
  54. <div class="txt">果汁</div>
  55. </a>
  56. <a href="" class="icon-a">
  57. <img src="nav/wuliu.png" alt="" class="icon-b" />
  58. <div class="txt">物流</div>
  59. </a>
  60. <a href="" class="icon-a">
  61. <img src="nav/lipinka.png" alt="" class="icon-b" />
  62. <div class="txt">礼品卡</div>
  63. </a>
  64. </div>
  65. </div>
  66. <!--轮播图-->
  67. <div class="picture">
  68. <div class="imglist">
  69. <a href="" class="active"><img src="banner/mianbao.jpg" alt="" /></a>
  70. <a href=""><img src="banner/mianbao.jpg" alt="" /></a>
  71. <a href=""><img src="banner/mianbao.jpg" alt="" /></a>
  72. <div class="button">
  73. <span class="item active"></span>
  74. <span class="item"></span>
  75. <span class="item"></span>
  76. </div>
  77. </div>
  78. <!--产品区-->
  79. <div class="list-container">
  80. <div class="title-ctnr">
  81. <h5>甜品</h5>
  82. <small>推荐</small>
  83. </div>
  84. <ul class="block-ctnr">
  85. <li>
  86. <div class="cover-wrap">
  87. <img src="product/cake.PNG" alt="">
  88. </div>
  89. <div class="cover-cont">
  90. <div class="mov-detail">巧克力甜品</div>
  91. <div class="mov-info">
  92. <div>
  93. <i class="iconfont">&#xe8e3;</i>
  94. <span>产品价格</span>
  95. </div>
  96. <li>
  97. <div class="cover-wrap">
  98. <img src="product/cake.PNG" alt="">
  99. </div>
  100. <div class="cover-cont">
  101. <div class="mov-detail">巧克力甜品</div>
  102. <div class="mov-info">
  103. <div>
  104. <i class="iconfont">&#xe8e3;</i>
  105. <span>产品价格</span>
  106. </div>
  107. <li>
  108. <div class="cover-wrap">
  109. <img src="product/cake.PNG" alt="">
  110. </div>
  111. <div class="cover-cont">
  112. <div class="mov-detail">巧克力甜品</div>
  113. <div class="mov-info">
  114. <div>
  115. <i class="iconfont">&#xe8e3;</i>
  116. <span>产品价格</span>
  117. </div>
  118. <li>
  119. <div class="cover-wrap">
  120. <img src="product/cake.PNG" alt="">
  121. </div>
  122. <div class="cover-cont">
  123. <div class="mov-detail">巧克力甜品</div>
  124. <div class="mov-info">
  125. <div>
  126. <i class="iconfont">&#xe8e3;</i>
  127. <span>产品价格</span>
  128. </div>
  129. <li>
  130. <div class="cover-wrap">
  131. <img src="product/cake.PNG" alt="">
  132. </div>
  133. <div class="cover-cont">
  134. <div class="mov-detail">巧克力甜品</div>
  135. <div class="mov-info">
  136. <div>
  137. <i class="iconfont">&#xe8e3;</i>
  138. <span>产品价格</span>
  139. </div>
  140. <li>
  141. <div class="cover-wrap">
  142. <img src="product/cake.PNG" alt="">
  143. </div>
  144. <div class="cover-cont">
  145. <div class="mov-detail">巧克力甜品</div>
  146. <div class="mov-info">
  147. <div>
  148. <i class="iconfont">&#xe8e3;</i>
  149. <span>产品价格</span>
  150. </div>
  151. </div>
  152. </div>
  153. </li>
  154. </ul>
  155. </div>
  156. <!-- footer-->
  157. <div class="footer">
  158. <li>
  159. <a href="">
  160. <svg class="icon" aria-hidden="true">
  161. <use xlink:href="#icon-shouyeshouye"></use>
  162. </svg> </a>首页
  163. </li>
  164. <li>
  165. <a href="">
  166. <svg class="icon" aria-hidden="true">
  167. <use xlink:href="#icon-chanpin"></use>
  168. </svg> </a>产品
  169. </li>
  170. <li>
  171. <a href="">
  172. <svg class="icon" aria-hidden="true">
  173. <use xlink:href="#icon-gouwuche"></use>
  174. </svg> </a>购物车
  175. </li>
  176. <li>
  177. <a href="">
  178. <svg class="icon" aria-hidden="true">
  179. <use xlink:href="#icon-wode"></use>
  180. </svg> </a>我的
  181. </li>
  182. </div>
  183. </div>
  184. </body>
  185. </html>

CSS

  1. @import url(shangpin/iconfont.css);
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. }
  7. a {
  8. text-decoration: none;
  9. color: #666;
  10. }
  11. li {
  12. list-style: none;
  13. }
  14. @media screen and (min-width: 480px) {
  15. :root {
  16. font-size: 12px;
  17. }
  18. }
  19. @media screen and (min-width: 640px) {
  20. :root {
  21. font-size: 14px;
  22. }
  23. }
  24. @media screen and (min-width: 720px) {
  25. :root {
  26. font-size: 16px;
  27. }
  28. }
  29. @media screen and (min-width: 1080px) {
  30. :root {
  31. font-size: 18px;
  32. }
  33. }
  34. /* 菜单栏 */
  35. .home-a .header-a {
  36. background-color: rgb(236, 189, 189);
  37. display: grid;
  38. grid-template-columns: 5rem 1fr 5rem;
  39. place-items: left;
  40. color: #fff;
  41. }
  42. .home-a .header-a li {
  43. font-size: 15px;
  44. color: blue;
  45. }
  46. .home-a .header-a .icon {
  47. width: 1em;
  48. height: 1em;
  49. vertical-align: -0.15em;
  50. fill: currentColor;
  51. overflow: hidden;
  52. font-size: 30px;
  53. }
  54. .home-a .search .icon {
  55. width: 1em;
  56. height: 1em;
  57. vertical-align: -0.15em;
  58. fill: currentColor;
  59. overflow: hidden;
  60. font-size: 20px;
  61. }
  62. .home-a .search form input {
  63. min-height: 30px;
  64. min-width: 30px;
  65. outline: none;
  66. border: none;
  67. color: gray;
  68. background-color: black;
  69. }
  70. /* */
  71. /* 导航 */
  72. .main .navs {
  73. display: flex;
  74. padding: 0.6rem 0.5rem;
  75. place-content: space-evenly;
  76. place-items: center;
  77. flex-direction: row;
  78. align-items: center;
  79. }
  80. .main .navs .icon-a {
  81. display: flex;
  82. flex-direction: column;
  83. place-items: center;
  84. font-size: 14px;
  85. color: #666;
  86. }
  87. .main .nvas .icon-a .icon-b {
  88. width: 4rem;
  89. height: 4rem;
  90. }
  91. .main .navs img {
  92. height: 40px;
  93. width: 40px;
  94. }
  95. /* 轮播图 */
  96. .picture {
  97. width: 100vw;
  98. height: 60px;
  99. position: relative;
  100. }
  101. .picture .imglist {
  102. width: 100%;
  103. height: 200px;
  104. }
  105. .picture .imglist img {
  106. width: 100%;
  107. height: 300px;
  108. }
  109. .picture .imglist a {
  110. display: none;
  111. }
  112. .picture .imglist a.active {
  113. display: block;
  114. }
  115. .picture .button {
  116. width: 6rem;
  117. height: 3rem;
  118. position: absolute;
  119. top: 10rem;
  120. right: 0em;
  121. display: flex;
  122. justify-content: center;
  123. }
  124. .picture .button .item {
  125. height: 1.1rem;
  126. width: 1.1rem;
  127. border-radius: 50%;
  128. background-color: #ccc;
  129. margin: 0.6rem;
  130. }
  131. .picture .button .item:hover {
  132. cursor: pointer;
  133. }
  134. .picture .button .item.active {
  135. background-color: #e90e9c;
  136. }
  137. /* 产品区 */
  138. .list-container {
  139. margin: 2rem 0;
  140. display: grid;
  141. grid-template-rows: 3rem 1fr;
  142. background-color: #fff;
  143. }
  144. .list-container .title-ctnr {
  145. display: flex;
  146. padding: 4.5rem;
  147. place-content: space-between;
  148. place-items: center;
  149. }
  150. .list-container .title-ctnr span {
  151. color: grey;
  152. }
  153. .list-container .title-ctnr h5 {
  154. font-size: 1rem;
  155. }
  156. .list-container .block-ctnr {
  157. width: 100%;
  158. padding: 2.5rem;
  159. display: grid;
  160. grid-template-columns: repeat(2, 1fr);
  161. grid-template-rows: repeat(2, 1fr);
  162. gap: 1rem;
  163. }
  164. .list-container .block-ctnr li {
  165. height: 15rem;
  166. }
  167. .list-container .block-ctnr li img {
  168. width: 100%;
  169. height: 10rem;
  170. }
  171. .cover-cont .mov-detail {
  172. font-size: 1.4rem;
  173. }
  174. .cover-cont .mov-info {
  175. margin-top: 1rem;
  176. display: flex;
  177. place-content: space-between;
  178. align-items: baseline;
  179. color: grey;
  180. }
  181. /* footer */
  182. .footer {
  183. display: flex;
  184. padding: 0;
  185. place-content: space-evenly;
  186. place-items: center;
  187. flex-direction: row;
  188. align-items: center;
  189. }
  190. .footer li {
  191. font-size: 20px;
  192. color: black;
  193. }
  194. .footer .icon {
  195. width: 1em;
  196. height: 1em;
  197. vertical-align: -0.15em;
  198. fill: currentColor;
  199. overflow: hidden;
  200. font-size: 45px;
  201. }

效果图



批改老师:PHPzhongPHPzhong

批改状态:合格

老师批语:

版权申明:本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!

全部评论

文明上网理性发言,请遵守新闻评论服务协议

条评论
  • 2020-07-01

    690

    台部分,是运行在PC等浏览器上展现给用户浏览的技术一般分为设计和开发,设计一般可以理解为的视觉设计,开发则是台代码实现。
    vue.swiper是目应用较广泛的触摸内容滑js插件,是纯javascript打造的滑特效插件,向手机、平板电脑等;能实现触屏焦点图、触屏Tab切换、触屏多图切换等常用效果。
    vue.js能做pc,因为Vue是一套构建用户界的渐进式框架,不管是用在PC还是用在,只要提供对应的API及数据相应就可以;但是PC对于搜索引擎可能不太友好,无法让搜索引擎把整个收录
    PC登录需要在微信开放平台申请,而授权登录只需要有已经认证的服务号即可。然后同一个平台,用同一个微信用户去登录,会发现PC获取的微信用户openid和不同,这个问题如何解决?
    JavaScript是技术中非常重要的内容,用于实现各种态效果,提升用户体验感;若关闭JavaScript会造成上很多功能无法使用,使得体验差或部分功能无法使用。
    JavaScript是技术中非常重要的内容,用于实现各种态效果,提升用户体验感;若关闭JavaScript会造成上很多功能无法使用,使得体验差或部分功能无法使用。
    vuejs的使用场景:1、单应用程序;2、开发,可以结合i-view、Element UI等一些成熟的UI库一起开发;3、维护较少,组件复用要求不高的项目;4、具有复杂交互逻辑的应用等
    asp和php的区别:1、asp是用asp脚本开发的,而php是用php脚本开发的;2、ASP是Active Server Page的缩写,意为“活服务器”,而PHP是在服务器执行的脚本语言
    vue.js支持,以制作的Webapp;Vue.js是一个开源JavaScript框架,能够开发单应用程序;它还可以用作Web应用程序框架,旨在简化Web开发。
    Docker管理板,可以把服务器软件应用的安装行为简化到极致,堪称服务器的应用宝,具有集群管理、自故障转、自负载均衡等高级功能,可轻易搭建7*24小时在线的运行环境。

    2021-09-24

    992

    vuejs能做的事:1、能让基于应用程序开发起来更加方便;2、可以简单写单个,也可以写一个大的系统;3、可以做从简单到复杂的应用,随处可见的Web都可以用Vue来开发。
    区别:Vant是一套轻量、可靠的Vue组件库,可以快速搭建出风格统一的,提升开发效率;而uni-app是一个使用Vue.js开发跨平台应用的框架,可以用于开发出兼容多的应用。
    javascript是。javascript是开发语言,经常与html、css技术一起构成开发;它一般通过ajax与后台进行数据交互。
    php实现文件上传下载的方法:首先创建好表单;然后将客户文件上传到服务器;最后将服务器的文件到指定目录即可。
    php中文作为知名编程学习,为您整理了一些React试题,帮助开发人员准备和清除React试障碍。
    随着技术的不断迭代更新,很多功能的实现都转去实现,2018年第一季度编程语言排名来看,JavaScript仍然是最受欢...
    开发越来越吃香,如果你想从事大开发,javascript要求必学必会,所以php中文作为知名编程学习,为您整理了2021年最全的js试题,包含js基础试题、js高级试题以及js
    1、微信登录必须在微信中实现。和PC扫码登录不同,无法使用普通浏览器微信授权登录,必须在微信中使用,这是必须要明确的。2、准备工作。我们需要有一个已经认证的微信服务号,这是必备条件。
    jQuery JavaScript ajax区别:1、javaScript广泛用于客户Web开发的脚本语言,常用来给HTML添加态功能;2、AJAX创建交互式应用的开发技术;3、jQuery
    在vue中,Mint UI是饿了么团队开源的一款基于Vue.js的组件库。