index.wxss 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. /**index.wxss**/
  2. page {
  3. overflow-x: hidden;
  4. overflow-y: scroll;
  5. display: flex;
  6. flex-direction: column;
  7. }
  8. .header {
  9. height: 330rpx;
  10. position: relative;
  11. }
  12. .header .header-bg {
  13. z-index: 1;
  14. position: absolute;
  15. top: 0;
  16. left: 0;
  17. width: 100vw;
  18. height: 295rpx;
  19. background: #dfefec;
  20. }
  21. .header .logo {
  22. width: 150rpx;
  23. height: 150rpx;
  24. z-index: 99;
  25. }
  26. .header .logo.logo-at-left {
  27. position: absolute;
  28. top: 96rpx;
  29. left: 36rpx;
  30. }
  31. .header .logo-image {
  32. width: 100%;
  33. height: 100%;
  34. }
  35. .header .search-icon {
  36. position: absolute;
  37. z-index: 99;
  38. top: 260rpx;
  39. left: 30rpx;
  40. height: 65rpx;
  41. width: 530rpx;
  42. }
  43. .header .cart-icon {
  44. position: absolute;
  45. z-index: 99;
  46. top: 260rpx;
  47. right: 30rpx;
  48. height: 65rpx;
  49. width: 146rpx;
  50. }
  51. .banner {
  52. display: flex;
  53. justify-content: center;
  54. align-items: center;
  55. padding: 24rpx 0 10rpx;
  56. }
  57. .banner .banner-item {
  58. border: 1px solid #dfefec;
  59. width: 690rpx;
  60. height: 310rpx;
  61. display: block;
  62. border-radius: 25rpx;
  63. }
  64. .hot-bar {
  65. padding: 14rpx 30rpx 10rpx;
  66. display: flex;
  67. flex-direction: row;
  68. flex-wrap: nowrap;
  69. justify-content: space-between;
  70. align-items: center;
  71. }
  72. .hot-bar .hot-image {
  73. width: 220rpx;
  74. height: 300rpx;
  75. }
  76. .brand-bar {
  77. padding: 14rpx 30rpx 10rpx;
  78. display: flex;
  79. flex-direction: row;
  80. flex-wrap: wrap;
  81. justify-content: space-between;
  82. align-items: center;
  83. }
  84. .brand-bar .brand-item {
  85. width: 120rpx;
  86. height: 120rpx;
  87. margin-bottom: 20rpx;
  88. }
  89. .brand-bar .brand-item .brand-image {
  90. width: 100%;
  91. height: 100%;
  92. }
  93. .slider {
  94. display: flex;
  95. justify-content: center;
  96. align-items: center;
  97. padding: 24rpx 0 10rpx;
  98. }
  99. .slider .slider-item {
  100. border: 1px solid #dfefec;
  101. width: 690rpx;
  102. height: 220rpx;
  103. display: block;
  104. border-radius: 25rpx;
  105. }
  106. .category {
  107. height: 300rpx;
  108. margin: 14rpx 30rpx 10rpx 30rpx;
  109. border: 1px solid #dfefec;
  110. border-radius: 25rpx;
  111. padding: 20rpx;
  112. display: flex;
  113. flex-direction: row;
  114. flex-wrap: wrap;
  115. justify-content: space-between;
  116. align-items: center;
  117. }
  118. .category .category-item {
  119. width: 144rpx;
  120. height: 144rpx;
  121. margin-bottom: 20rpx;
  122. }
  123. .category .category-item .category-image {
  124. width: 100%;
  125. height: 100%;
  126. }
  127. .goods {
  128. display: flex;
  129. flex-direction: column;
  130. padding: 21rpx 21rpx 0 21rpx;
  131. }
  132. .goods-row {
  133. display: flex;
  134. flex-direction: row;
  135. justify-content: space-evenly;
  136. margin-bottom: 21rpx;
  137. }
  138. .goods-item {
  139. width: 326rpx; /* 313*1.0417 */
  140. background: #fff;
  141. border-radius: 21rpx; /* 20*1.0417 */
  142. box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.05);
  143. overflow: hidden;
  144. display: flex;
  145. flex-direction: column;
  146. }
  147. .goods-image {
  148. width: 326rpx;
  149. height: 326rpx;
  150. margin: 0;
  151. border-top-left-radius: 21rpx;
  152. border-top-right-radius: 21rpx;
  153. border-bottom-left-radius: 0;
  154. border-bottom-right-radius: 0;
  155. overflow: hidden;
  156. background: #f7f7f7;
  157. }
  158. .goods-image-inner {
  159. width: 100%;
  160. height: 100%;
  161. object-fit: cover;
  162. }
  163. .goods-info {
  164. padding: 16rpx 21rpx 0 21rpx;
  165. }
  166. .goods-name {
  167. font-size: 18rpx;
  168. color: #333;
  169. display: block;
  170. margin-bottom: 8rpx;
  171. font-weight: bold;
  172. }
  173. .goods-price {
  174. font-size: 20rpx;
  175. color: #e4393c;
  176. font-weight: bold;
  177. }
  178. .goods-action {
  179. display: flex;
  180. align-items: center;
  181. justify-content: flex-end;
  182. padding: 16rpx 21rpx 21rpx 21rpx;
  183. }
  184. .favorite {
  185. width: 32rpx;
  186. height: 32rpx;
  187. }
  188. .favorite-icon {
  189. width: 100%;
  190. height: 100%;
  191. }
  192. .add-to-cart,
  193. .buy-now {
  194. width: 105rpx;
  195. height: 36rpx;
  196. line-height: 36rpx;
  197. font-size: 16rpx;
  198. border-radius: 6rpx;
  199. margin-left: 8rpx;
  200. padding: 0;
  201. border: none;
  202. display: flex;
  203. align-items: center;
  204. justify-content: center;
  205. box-sizing: border-box;
  206. }
  207. .add-to-cart {
  208. background: #fff;
  209. color: #7AC7B5;
  210. border: 2rpx solid #7AC7B5;
  211. }
  212. .buy-now {
  213. background: #7AC7B5;
  214. color: #fff;
  215. border: none;
  216. }