home.wxss 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /* pages/home/home.wxss */
  2. .bigBox {
  3. position: relative;
  4. height: 210rpx;
  5. z-index: 100;
  6. }
  7. /* 头部区域 */
  8. .head {
  9. height: 130rpx;
  10. background-color: #f5f5f5;
  11. /* margin-top: -20rpx; */
  12. /*怎么办啊啊啊*/
  13. }
  14. .head-portrait-bg {
  15. float: left;
  16. width: 104rpx;
  17. height: 104rpx;
  18. background-color: #DDDEDF;
  19. border-radius: 20rpx;
  20. }
  21. .head-portrait-img {
  22. width: 100rpx;
  23. height: 100rpx;
  24. border-radius: 20rpx;
  25. }
  26. .username {
  27. float: left;
  28. /* width: 100rpx; */
  29. width: fit-content;
  30. margin-top: 30rpx;
  31. margin-left: 20rpx;
  32. font-size: 18px;
  33. }
  34. .head_bell {
  35. float: left;
  36. margin-top: -75rpx;
  37. margin-left: 650rpx;
  38. }
  39. /* ------------------------------ */
  40. /* 搜索栏 */
  41. .search_box {
  42. width: 720rpx;
  43. height: 80rpx;
  44. background-color: #E8E7E7;
  45. border-radius: 20rpx;
  46. }
  47. .search_text {
  48. float: left;
  49. padding-left: 15rpx;
  50. padding-top: 15rpx;
  51. }
  52. .search_icon {
  53. margin-bottom: 1rpx;
  54. }
  55. .search_button {
  56. float: right;
  57. width: 80rpx;
  58. height: 80rpx;
  59. margin-right: 10rpx;
  60. }
  61. /* 去除button边框 */
  62. button[plain]{ border:0 }
  63. /* ------------------------------ */
  64. /* 分类栏 */
  65. .categories {
  66. margin-top: 18rpx;
  67. }
  68. .categories view:nth-child(1) {
  69. float: left;
  70. margin-right: 75rpx;
  71. }
  72. .categories view:nth-child(2) {
  73. float: right;
  74. margin-top: 12rpx;
  75. }
  76. .categories_block {
  77. position: absolute;
  78. top: 18rpx;
  79. }
  80. /* 分类卡片展示 */
  81. .categories_card {
  82. display: inline-block;
  83. margin-right: 10rpx;
  84. }
  85. .name_show {
  86. position: absolute;
  87. top: 93rpx;
  88. width: 150rpx;
  89. height: 60rpx;
  90. background-color: #eeeeee;
  91. opacity: 0.7;
  92. text-align: center;
  93. line-height: 60rpx;
  94. }
  95. /* ------------------------------ */
  96. /* 商品 */
  97. .recommend_block {
  98. position: absolute;
  99. width: 170rpx;
  100. top: 32rpx
  101. }
  102. /* ------------------------------ */
  103. /* 商品 */
  104. .commodity {
  105. display: flex;
  106. flex-wrap: wrap; /*自动换行*/
  107. margin-top: 10rpx;
  108. }
  109. .commodity_show {
  110. display: flex;
  111. position: relative;
  112. width: 48%;
  113. height: 500rpx;
  114. padding: 7rpx;
  115. justify-content: center;
  116. }
  117. .commodity_image {
  118. width: 340rpx;
  119. height: 340rpx;
  120. border-radius: 20rpx;
  121. }
  122. .commodity_name {
  123. position: absolute;
  124. top: 360rpx;
  125. left: 15rpx;
  126. width: 350rpx;
  127. white-space: nowrap;
  128. overflow: hidden;
  129. text-overflow: ellipsis;
  130. }
  131. .price {
  132. position: absolute;
  133. top: 400rpx;
  134. left: 12rpx;
  135. color: #a08016;
  136. font-weight: 600;
  137. }