index.wxss 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /**index.wxss**/
  2. page {
  3. overflow-x: hidden;
  4. overflow-y: scroll;
  5. display: flex;
  6. flex-direction: column;
  7. }
  8. .container {
  9. padding-top: 330rpx; /* 留出头部空间 */
  10. }
  11. .banner {
  12. z-index: 1200;
  13. top: 0;
  14. display: flex;
  15. justify-content: center;
  16. align-items: center;
  17. padding: 24rpx 0 10rpx;
  18. }
  19. .banner .banner-item {
  20. border: 1px solid #dfefec;
  21. width: 100%;
  22. height: 310rpx;
  23. display: block;
  24. border-radius: 25rpx;
  25. }
  26. .banner .banner-item .bannerImg {
  27. width: 100%;
  28. height: auto;
  29. display:block;
  30. }
  31. .hot-bar {
  32. padding: 14rpx 30rpx 10rpx;
  33. display: flex;
  34. flex-direction: row;
  35. flex-wrap: nowrap;
  36. justify-content: space-between;
  37. align-items: center;
  38. }
  39. .hot-bar .hot-image {
  40. width: 220rpx;
  41. height: 300rpx;
  42. }
  43. .brand-bar {
  44. /* padding: 14rpx 30rpx 10rpx; */
  45. margin: 14rpx 30rpx 10rpx 30rpx;
  46. display: flex;
  47. flex-direction: row;
  48. flex-wrap: wrap;
  49. justify-content: space-between;
  50. align-items: center;
  51. position: relative;
  52. height: 300rpx;
  53. padding: 20rpx;
  54. transition: all 0.3s ease;
  55. }
  56. .brand-bar.mini {
  57. opacity: 1;
  58. position: fixed; /* 固定在页面顶部 */
  59. z-index: 1100;
  60. min-width: 365rpx;
  61. height: 80rpx;
  62. width: 656rpx;
  63. flex-wrap: nowrap;
  64. overflow-x: auto;
  65. top: 316rpx;
  66. background: rgb(252, 84, 255);
  67. border-radius: 30rpx;
  68. }
  69. .brand-bar .brand-item {
  70. width: 120rpx;
  71. height: 120rpx;
  72. margin-bottom: 20rpx;
  73. }
  74. .brand-bar .brand-item .brand-image {
  75. width: 100%;
  76. height: 100%;
  77. }
  78. .brand-bar.mini .brand-item {
  79. width: auto;
  80. height: 80rpx;
  81. margin: 0 20rpx;
  82. display: flex;
  83. align-items: center;
  84. }
  85. .brand-bar.mini .brand-item .brand-image {
  86. display: none;
  87. }
  88. .brand-bar.mini .brand-item span {
  89. display:block;
  90. font-size: 28rpx;
  91. color: #097561;
  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. position: relative;
  108. height: 300rpx;
  109. margin: 14rpx 30rpx 10rpx 30rpx;
  110. border: 1px solid #097561;
  111. background-color: #cdf3ec;
  112. border-radius: 25rpx;
  113. padding: 20rpx;
  114. display: flex;
  115. flex-direction: row;
  116. flex-wrap: wrap;
  117. justify-content: space-between;
  118. align-items: center;
  119. transition: all 0.3s ease;
  120. }
  121. /* mini 模式的css */
  122. .category.mini {
  123. opacity: 1;
  124. position: fixed; /* 固定在页面顶部 */
  125. z-index: 1000;
  126. height: 80rpx;
  127. padding: 0 20rpx;
  128. flex-wrap: nowrap;
  129. overflow-x: auto;
  130. top: 440rpx;
  131. }
  132. .category.mini .category-item {
  133. width: auto;
  134. height: 80rpx;
  135. margin: 0 20rpx;
  136. display: flex;
  137. align-items: center;
  138. }
  139. .category.mini .category-item .category-image {
  140. display: none;
  141. }
  142. .category.mini .category-item span {
  143. display:block;
  144. font-size: 28rpx;
  145. color: #097561;
  146. }
  147. /* mini 模式的css 结束 */
  148. .category .category-item {
  149. width: 144rpx;
  150. height: 174rpx;
  151. margin-bottom: 0rpx;
  152. font-size: 28rpx;
  153. text-align: center;
  154. }
  155. .category .category-item .category-image {
  156. width: 100%;
  157. height: 124rpx;
  158. background-color: #57c6b1;
  159. }
  160. .category .category-item span {
  161. display: none;
  162. }