index.wxss 2.9 KB

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