index.wxss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. display: flex;
  41. flex-direction: row;
  42. flex-wrap: wrap;
  43. justify-content: space-between;
  44. align-items: center;
  45. }
  46. .brand-bar .brand-item {
  47. width: 120rpx;
  48. height: 120rpx;
  49. margin-bottom: 20rpx;
  50. }
  51. .brand-bar .brand-item .brand-image {
  52. width: 100%;
  53. height: 100%;
  54. }
  55. .slider {
  56. display: flex;
  57. justify-content: center;
  58. align-items: center;
  59. padding: 24rpx 0 10rpx;
  60. }
  61. .slider .slider-item {
  62. border: 1px solid #dfefec;
  63. width: 690rpx;
  64. height: 220rpx;
  65. display: block;
  66. border-radius: 25rpx;
  67. }
  68. .category {
  69. position: relative;
  70. height: 300rpx;
  71. margin: 14rpx 30rpx 10rpx 30rpx;
  72. border: 1px solid #097561;
  73. background-color: #cdf3ec;
  74. border-radius: 25rpx;
  75. padding: 20rpx;
  76. display: flex;
  77. flex-direction: row;
  78. flex-wrap: wrap;
  79. justify-content: space-between;
  80. align-items: center;
  81. transition: all 0.3s ease;
  82. }
  83. /* mini 模式的css */
  84. .category.mini {
  85. position: fixed; /* 固定在页面顶部 */
  86. z-index: 1000;
  87. top: 0px;
  88. height: 80rpx;
  89. padding: 0 20rpx;
  90. flex-wrap: nowrap;
  91. overflow-x: auto;
  92. }
  93. .category.mini .category-item {
  94. width: auto;
  95. height: 80rpx;
  96. margin: 0 20rpx;
  97. display: flex;
  98. align-items: center;
  99. }
  100. .category.mini .category-item .category-image {
  101. display: none;
  102. }
  103. .category.mini .category-item span {
  104. font-size: 28rpx;
  105. color: #097561;
  106. }
  107. /* mini 模式的css 结束 */
  108. .category .category-item {
  109. width: 144rpx;
  110. height: 174rpx;
  111. margin-bottom: 0rpx;
  112. font-size: 28rpx;
  113. text-align: center;
  114. }
  115. .category .category-item .category-image {
  116. width: 100%;
  117. height: 124rpx;
  118. background-color: #57c6b1;
  119. }