Blogger Information
Blog 11
fans 0
comment 0
visits 27426
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
HTML制作静态商品购物车结算页面
饮雪煮茶
Original
18337 people have browsed it

通过十节课20个小时的学习,提高还是显著的,可能平时还是做的比较少,对细节处理上感觉力不从心,基本大的方面问题应该不是太大了。总体来说大的宏观结构布局掌握差不多了,就是细小各类插件的运用,细节处理上对齐,线条还是有点问题。

购物车页面html

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>商品购物车</title>
  6. <link rel="stylesheet" href="../static/font/iconfont.css">
  7. <link rel="stylesheet" href="./public_shop_cart.css">
  8. </head>
  9. <body>
  10. <nav class="public-header">
  11. <a href="">网站首页</a>
  12. <a href="">专题</a>
  13. <a href="">网站导航</a>
  14. <a href="">二手商品</a>
  15. <a href="">讨论区</a>
  16. <span>
  17. <a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a>
  18. <a href="">免费注册</a>
  19. </span>
  20. </nav>
  21. <div class="public-shop-cart">
  22. <div class="content">
  23. <span>全部商品 3</span>
  24. <div class="cart-title">
  25. <span>
  26. <input type="checkbox" id="all">
  27. <label for="all">全选</label>
  28. </span>
  29. <span>商品</span>
  30. <span>单价</span>
  31. <span>数量</span>
  32. <span>小计</span>
  33. <span>操作</span>
  34. </div>
  35. <div class="cart-detail"3>
  36. <input type="checkbox">
  37. <div class="cart-title">
  38. <img src="../static/images/cart1.png" alt="">
  39. <div>
  40. <a href=""><i>京东电脑</i> 惠普(HP)战66 微边框商用一体机电脑23.8英寸(九代i5-9500T</a>
  41. <span><i class="iconfont icon-icon_shezhi"></i><a href="">选服务</a></span>
  42. </div>
  43. <span>【九代i5/8G/双硬盘/独</span>
  44. </div>
  45. <div class="cart-price">&yen;4999.00</div>
  46. <div class="cart-number">
  47. <span class="sub">-</span> <input type="text" id="mumber" value="1"><span class="plus">+</span>
  48. </div>
  49. <div class="cart-subtotal">&yen;4999.00</div>
  50. <div class="cart-oprate"><a href="">删除</a></div>
  51. </div>
  52. <div class="cart-detail"3>
  53. <input type="checkbox">
  54. <div class="cart-title">
  55. <img src="../static/images/cart1.png" alt="">
  56. <div>
  57. <a href=""><i>京东电脑</i> 惠普(HP)战66 微边框商用一体机电脑23.8英寸(九代i5-9500T</a>
  58. <span><i class="iconfont icon-icon_shezhi"></i><a href="">选服务</a></span>
  59. </div>
  60. <span>【九代i5/8G/双硬盘/独</span>
  61. </div>
  62. <div class="cart-price">&yen;4999.00</div>
  63. <div class="cart-number">
  64. <span class="sub">-</span> <input type="text" id="mumber" value="1"><span class="plus">+</span>
  65. </div>
  66. <div class="cart-subtotal">&yen;4999.00</div>
  67. <div class="cart-oprate"><a href="">删除</a></div>
  68. </div>
  69. <div class="cart-detail"3>
  70. <input type="checkbox">
  71. <div class="cart-title">
  72. <img src="../static/images/cart1.png" alt="">
  73. <div>
  74. <a href=""><i>京东电脑</i> 惠普(HP)战66 微边框商用一体机电脑23.8英寸(九代i5-9500T</a>
  75. <span><i class="iconfont icon-icon_shezhi"></i><a href="">选服务</a></span>
  76. </div>
  77. <span>【九代i5/8G/双硬盘/独</span>
  78. </div>
  79. <div class="cart-price">&yen;4999.00</div>
  80. <div class="cart-number">
  81. <span class="sub">-</span> <input type="text" id="mumber" value="1"><span class="plus">+</span>
  82. </div>
  83. <div class="cart-subtotal">&yen;4999.00</div>
  84. <div class="cart-oprate"><a href="">删除</a></div>
  85. </div>
  86. <div class="cart-detail"3>
  87. <input type="checkbox">
  88. <div class="cart-title">
  89. <img src="../static/images/cart1.png" alt="">
  90. <div>
  91. <a href=""><i>京东电脑</i> 惠普(HP)战66 微边框商用一体机电脑23.8英寸(九代i5-9500T</a>
  92. <span><i class="iconfont icon-icon_shezhi"></i><a href="">选服务</a></span>
  93. </div>
  94. <span>【九代i5/8G/双硬盘/独</span>
  95. </div>
  96. <div class="cart-price">&yen;4999.00</div>
  97. <div class="cart-number">
  98. <span class="sub">-</span> <input type="text" id="mumber" value="1"><span class="plus">+</span>
  99. </div>
  100. <div class="cart-subtotal">&yen;4999.00</div>
  101. <div class="cart-oprate"><a href="">删除</a></div>
  102. </div>
  103. <div class="cart-btn"><span>总价:</span><span> ¥14797.00 </span><button class="btn">去结算</button></div>
  104. </div>
  105. </div>
  106. <footer class="public-footer">
  107. <div>
  108. <a href="">简介</a>
  109. <a href="">联系我们</a>
  110. <a href="">招聘信息</a>
  111. <a href="">友情链接</a>
  112. <a href="">用户服务协议</a>
  113. <a href="">隐私权声明</a>
  114. <a href="">法律投诉声明</a>
  115. </div>
  116. <div><span>LOGO</span></div>
  117. <div>
  118. <p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
  119. <p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
  120. <p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
  121. </div>
  122. <div>
  123. <p>关注公众号</p>
  124. <img src="../static/images/erwei-code.png" alt="">
  125. </div>
  126. </footer>
  127. </body>
  128. </html>

购物车css

  1. @import "../public_reset.css";
  2. @import "../public_header/public_header.css";
  3. @import "../public_footer/public_footer.css";
  4. .public-shop-cart > .content {
  5. width: 1200px;
  6. background-color: #fff;
  7. margin: 20px auto;
  8. display: flex;
  9. flex-direction: column;
  10. }
  11. .public-shop-cart > .content > span{
  12. font-size: 20px;
  13. color: #E2231A;
  14. border-bottom: 1px solid #E2231A;
  15. height: 30px;
  16. width: 100px;
  17. padding: 3px;
  18. }
  19. .public-shop-cart > .content > .cart-title{
  20. height: 32px;
  21. background-color: #f3f3f3;
  22. border: 1px solid #eee;
  23. display: grid;
  24. grid-template-columns: 100px 1fr 100px 120px 100px 100px;
  25. align-items: center;
  26. padding-left: 10px;
  27. }
  28. .public-shop-cart > .content > .cart-detail{
  29. background-color: #fff4e8;
  30. border-bottom: 1px solid #ddd;
  31. padding: 20px 5px;
  32. display: grid;
  33. grid-template-columns: 40px 1fr 100px 120px 100px 100px;
  34. align-items: center;
  35. }
  36. .public-shop-cart > .content > div.cart-detail:last-of-type{
  37. border-bottom: none;
  38. }
  39. .public-shop-cart > .content >.cart-detail > .cart-title{
  40. display: flex;
  41. }
  42. .public-shop-cart > .content >.cart-detail > .cart-title > div{
  43. width: 300px;
  44. padding: 0 15px;
  45. display: flex;
  46. flex-flow: column wrap;
  47. }
  48. .public-shop-cart > .content >.cart-detail > .cart-title > div > a > i{
  49. font-style: normal;
  50. color: #fff;
  51. background-color: #E2231A;
  52. border-radius: 3px;
  53. padding: 0 5px;
  54. }
  55. .public-shop-cart > .content >.cart-detail > .cart-title > div > a:hover{
  56. color: #E2231A;
  57. }
  58. .public-shop-cart > .content >.cart-detail > .cart-title > div > span > i{
  59. color: #E2231A;
  60. margin-right: 5px;
  61. }
  62. .public-shop-cart > .content >.cart-detail > .cart-title > div > span > a:hover{
  63. color: #E2231A;
  64. }
  65. .public-shop-cart > .content >.cart-detail > .cart-title >img{
  66. width: 80px;
  67. height: 80px;
  68. }
  69. .public-shop-cart > .content > .cart-detail > .cart-number {
  70. display: flex;
  71. }
  72. .public-shop-cart > .content > .cart-detail > .cart-number >input{
  73. width: 50px;
  74. height: 20px;
  75. text-align: center;
  76. outline: none;
  77. box-shadow: none;
  78. border: none;
  79. border-top: 1px solid #aaa;
  80. border-bottom: 1px solid #aaa;
  81. }
  82. .public-shop-cart > .content > .cart-detail > .cart-number > span{
  83. width: 20px;
  84. height: 20px ;
  85. border: 1px solid #aaa;
  86. font-size: 15px;
  87. text-align: center;
  88. }
  89. .public-shop-cart > .content > .cart-detail > .cart-number > span:hover{
  90. cursor: pointer;
  91. }
  92. .public-shop-cart > .content > .cart-btn{
  93. margin-top: 50px;
  94. height: 50px;
  95. display: flex;
  96. justify-content: end;
  97. align-items: center;
  98. border: 1px solid #ddd;
  99. }
  100. .public-shop-cart > .content > .cart-btn > span:last-of-type{
  101. font-size: 20px;
  102. color: #E2231A;
  103. margin: 0 10px;
  104. font-weight: bold;
  105. }
  106. .public-shop-cart > .content > .cart-btn > .btn{
  107. width: 100px;
  108. height: 100%;
  109. font-size: 20px;
  110. color: #fff;
  111. border: none;
  112. background-color: #E2231A;
  113. }

商品购物车效果图

结算页面html

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>商品结算页面</title>
  6. <link rel="stylesheet" href="./public_shop_account.css">
  7. </head>
  8. <body>
  9. <nav class="public-header">
  10. <a href="">网站首页</a>
  11. <a href="">专题</a>
  12. <a href="">网站导航</a>
  13. <a href="">二手商品</a>
  14. <a href="">讨论区</a>
  15. <span>
  16. <a href=""><i class="iconfont icon-huiyuan2"></i>登陆</a>
  17. <a href="">免费注册</a>
  18. </span>
  19. </nav>
  20. <div class="public-shop-account">
  21. <div class="content">
  22. <div class="shop-account-head"> 填写并核对订单信息 </div>
  23. <div class="shop-account-info">
  24. <div class="edit-address">
  25. <div class="address-head">
  26. <span>收货人信息</span>
  27. <a href="">新增收货地址</a>
  28. </div>
  29. <div class="address-info">
  30. <span>家里</span>
  31. <span>xxx xx省xx市xx街道</span>
  32. <a href="">编辑</a>
  33. </div>
  34. </div>
  35. <div class="edit-pay">
  36. <div class="pay-head">支付方式</div>
  37. <div class="pay-info">
  38. <span>货到付款</span>
  39. <span>在线支付</span>
  40. <a href="">更多>></a>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="shop-account-detail">
  45. <div class="account-address">
  46. <span><i>3</i> 件商品,总商品金额:</span>
  47. <span>&yen;14797.00</span>
  48. <span>运费:</span>
  49. <span><i>&yen;0.00</i></span>
  50. <span>商品优惠:</span>
  51. <span>-¥5.00</span>
  52. </div>
  53. <div class="account-pay">
  54. <span> 应付总额: <i>&yen;14792.00 </i></span>
  55. <span>寄送至:xxxx xxxxxxxx 收货人:xxx 电话:</span>
  56. </div>
  57. <div class="account-btn"><button>提交订单</button></div>
  58. </div>
  59. </div>
  60. </div>
  61. <footer class="public-footer">
  62. <div>
  63. <a href="">简介</a>
  64. <a href="">联系我们</a>
  65. <a href="">招聘信息</a>
  66. <a href="">友情链接</a>
  67. <a href="">用户服务协议</a>
  68. <a href="">隐私权声明</a>
  69. <a href="">法律投诉声明</a>
  70. </div>
  71. <div><span>LOGO</span></div>
  72. <div>
  73. <p>2019 fengniao.com. All rights reserved . 安徽闹着玩有限公司(无聊网)版权所有</p>
  74. <p>皖ICP证150110号 京ICP备14323013号-2 皖公网安备110108024357788号</p>
  75. <p>违法和不良信息举报电话: 0551-1234567 举报邮箱: admin@baidu.com</p>
  76. </div>
  77. <div>
  78. <p>关注公众号</p>
  79. <img src="../static/images/erwei-code.png" alt="">
  80. </div>
  81. </footer>
  82. </body>
  83. </html>

结算页面css

  1. @import "../public_reset.css";
  2. @import "../public_header/public_header.css";
  3. @import "../public_footer/public_footer.css";
  4. .public-shop-account > .content {
  5. width: 1200px;
  6. background-color: #fff;
  7. margin: 20px auto;
  8. display: flex;
  9. flex-direction: column;
  10. }
  11. .public-shop-account > .content >.shop-account-head{
  12. margin: 10px 5px;
  13. font-size: 16px;
  14. }
  15. .public-shop-account > .content >.shop-account-info{
  16. border: 1px solid #ccc;
  17. padding: 10px;
  18. }
  19. .public-shop-account > .content >.shop-account-info > .edit-address{
  20. border-bottom: 1px solid #ccc;
  21. }
  22. .public-shop-account > .content >.shop-account-info > .edit-address >.address-head{
  23. display: flex;
  24. justify-content: space-between;
  25. padding: 10px 0;
  26. }
  27. .public-shop-account > .content >.shop-account-info > .edit-address >.address-head >span{
  28. font-size: 14px;
  29. font-weight: bold;
  30. }
  31. .public-shop-account > .content >.shop-account-info > .edit-address >.address-head >a{
  32. color: #005ea7;
  33. font-size: 12px;
  34. }
  35. .public-shop-account > .content >.shop-account-info > .edit-address >.address-head >a:hover{
  36. color: #E2231A;
  37. }
  38. .public-shop-account > .content >.shop-account-info > .edit-address > .address-info{
  39. display: flex;
  40. padding: 20px;
  41. justify-content: space-between;
  42. }
  43. .public-shop-account > .content >.shop-account-info > .edit-address > .address-info >span:first-of-type{
  44. width: 120px;
  45. height: 30px;
  46. border: 3px solid #E2231A;
  47. text-align: center;
  48. margin-right: 10px;
  49. font-size: 16px;
  50. line-height: 30px;
  51. }
  52. .public-shop-account > .content >.shop-account-info > .edit-pay > .pay-head{
  53. font-size: 14px;
  54. font-weight: bold;
  55. padding: 20px 0;
  56. }
  57. .public-shop-account > .content >.shop-account-info > .edit-pay >.pay-info{
  58. display: flex;
  59. align-items: center;
  60. }
  61. .public-shop-account > .content >.shop-account-info > .edit-pay >.pay-info >span{
  62. width: 100px;
  63. height: 30px;
  64. border: 2px solid #ccc;
  65. margin: 10px;
  66. text-align: center;
  67. line-height: 30px;
  68. }
  69. .public-shop-account > .content >.shop-account-info > .edit-pay >.pay-info >span:hover{
  70. border: 2px solid #E2231A;
  71. }
  72. .public-shop-account > .content > .shop-account-detail > .account-address{
  73. padding: 20px;
  74. display: grid;
  75. grid-template-columns: 1fr 150px;
  76. grid-template-rows: repeat(3, 30px);
  77. justify-items: end;
  78. }
  79. .public-shop-account > .content > .shop-account-detail > .account-address i{
  80. font-style: normal;
  81. color: #E2231A;
  82. }
  83. .public-shop-account > .content > .shop-account-detail > .account-pay{
  84. height: 80px;
  85. background-color: #eee;
  86. border: 1px solid #ccc;
  87. display: flex;
  88. padding: 10px 20px 0 0;
  89. flex-direction: column;
  90. align-items: flex-end;
  91. }
  92. .public-shop-account > .content > .shop-account-detail > .account-pay > span > i{
  93. font-style: normal;
  94. font-size: 20px;
  95. color: #E2231A;
  96. }
  97. .public-shop-account > .content > .shop-account-detail > .account-btn{
  98. display: flex;
  99. justify-content: flex-end;
  100. }
  101. .public-shop-account > .content > .shop-account-detail > .account-btn > button{
  102. border: none;
  103. background-color: #E2231A;
  104. color: #fff;
  105. width: 120px;
  106. height: 40px;
  107. font-size: 16px;
  108. font-weight: bold;
  109. margin: 10px 0;
  110. }

结算页面效果图

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
3 comments
小神 2022-10-08 16:54:07
不错,感谢分享
1 floor
不错不错不错
小神 2022-10-08 16:54:38
不错不错不错
小神 2022-10-08 16:54:25
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!