index.wxss 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. .i-btn {
  2. text-align: center;
  3. vertical-align: middle;
  4. touch-action: manipulation;
  5. cursor: pointer;
  6. background-image: none;
  7. white-space: nowrap;
  8. user-select: none;
  9. font-size: 28rpx;
  10. border: 0 !important;
  11. position: relative;
  12. text-decoration: none;
  13. height: 88rpx;
  14. line-height: 88rpx;
  15. background: none;
  16. color: #495060;
  17. border-radius: 0;
  18. margin: 0;
  19. box-shadow: none;
  20. }
  21. .i-btn::after {
  22. border: none;
  23. }
  24. .spu {
  25. width: 100%;
  26. display: block;
  27. }
  28. .spu .img-class {
  29. width: 710rpx;
  30. height: 400rpx;
  31. border-radius: 10rpx 10rpx 0 0;
  32. image-rendering: crisp-edges;
  33. }
  34. .spu .mask {
  35. background: rgba(255, 255, 255, 0.5);
  36. width: 710rpx;
  37. height: 400rpx;
  38. position: absolute;
  39. left: 0;
  40. top: 0;
  41. }
  42. .spu .act-end {
  43. position: absolute;
  44. height: 60rpx;
  45. border-radius: 10rpx;
  46. background: rgba(0, 0, 0, 0.5);
  47. color: #fff;
  48. font-size: 28rpx;
  49. text-align: center;
  50. line-height: 60rpx;
  51. left: 50%;
  52. top: 170rpx;
  53. padding: 0 12rpx;
  54. transform: translateX(-50%);
  55. }
  56. .spu .spu-content {
  57. background: #fff;
  58. width: 710rpx;
  59. border-radius: 20rpx;
  60. overflow: hidden;
  61. position: relative;
  62. box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05);
  63. margin: 0 auto 20rpx;
  64. display: flex;
  65. flex-direction: column;
  66. box-sizing: border-box;
  67. }
  68. .spu .spu-content.disabled {
  69. opacity: 0.6;
  70. }
  71. .spu .spu-content .item-top {
  72. width: 100%;
  73. height: 400rpx;
  74. position: relative;
  75. }
  76. .spu .spu-content .item-bottom {
  77. box-sizing: border-box;
  78. padding: 20rpx;
  79. display: flex;
  80. flex-direction: column;
  81. justify-content: space-between;
  82. }
  83. .spu .spu-content .item-bottom .spu-title {
  84. color: #222;
  85. font-size: 30rpx;
  86. height: 32rpx;
  87. width: 100%;
  88. margin-bottom: 12rpx;
  89. margin-top: 10rpx;
  90. font-weight: 500;
  91. position: relative;
  92. }
  93. .spu .spu-content .item-bottom .spu-title .span {
  94. width: 100%;
  95. height: 40rpx;
  96. position: absolute;
  97. left: 0;
  98. top: -4rpx;
  99. line-height: 40rpx;
  100. overflow: hidden;
  101. text-overflow: ellipsis;
  102. white-space: nowrap;
  103. }
  104. .spu .spu-content .item-bottom .spu-tag {
  105. padding-left: 196rpx;
  106. margin-bottom: 20rpx;
  107. display: flex;
  108. height: 28rpx;
  109. }
  110. .spu .spu-content .item-bottom .spu-desc {
  111. font-size: 26rpx;
  112. line-height: 26rpx;
  113. color: #999;
  114. position: relative;
  115. width: 100%;
  116. height: 26rpx;
  117. margin-bottom: 12rpx;
  118. }
  119. .spu .spu-content .item-bottom .spu-desc em {
  120. width: 100%;
  121. height: 32rpx;
  122. position: absolute;
  123. left: 0;
  124. top: -2rpx;
  125. line-height: 32rpx;
  126. overflow: hidden;
  127. text-overflow: ellipsis;
  128. white-space: nowrap;
  129. }
  130. .spu .spu-content .item-bottom .spu-price {
  131. display: flex;
  132. align-items: flex-end;
  133. font-size: 26rpx;
  134. line-height: 26rpx;
  135. overflow: hidden;
  136. margin-bottom: 10rpx;
  137. margin-top: 10rpx;
  138. }
  139. .spu .spu-content .item-bottom .spu-price .sale-price {
  140. color: #ff5344;
  141. margin-right: 12rpx;
  142. }
  143. .spu .spu-content .item-bottom .spu-price .sale-price .span {
  144. font-size: 46rpx;
  145. line-height: 42rpx;
  146. margin: 0;
  147. font-weight: bold;
  148. }
  149. .spu .spu-content .item-bottom .spu-price .market-price {
  150. text-decoration: line-through;
  151. color: #999;
  152. margin-right: 20rpx;
  153. }
  154. .spu .spu-content .item-bottom .spu-count {
  155. font-size: 24rpx;
  156. line-height: 24rpx;
  157. color: #999;
  158. }
  159. .spu .spu-content .add-cart, .spu .spu-content .add-cart-disabled {
  160. width: 160rpx;
  161. height: 60rpx;
  162. padding: 0;
  163. margin: 0;
  164. position: absolute;
  165. right: 28rpx;
  166. bottom: 20rpx;
  167. display: flex;
  168. align-items: center;
  169. justify-content: center;
  170. background: #ff5344;
  171. color: #fff;
  172. border-radius: 30rpx;
  173. }
  174. .spu .spu-content .add-cart-disabled {
  175. background: #ccc;
  176. }
  177. .spu .spu-content .add-cart.disabled {
  178. background: #ccc;
  179. }
  180. .spu .item-top .spu-active {
  181. position: absolute;
  182. left: 0;
  183. bottom: 0;
  184. z-index: 9;
  185. display: flex;
  186. flex-direction: column-reverse;
  187. align-items: flex-start;
  188. }
  189. .spu .item-top .spu-active .tag {
  190. background: linear-gradient(to right, #ff5041, #ff994b);
  191. border-radius: 0 14rpx 14rpx 0;
  192. padding: 0 12rpx;
  193. height: 30rpx;
  194. font-size: 20rpx;
  195. line-height: 30rpx;
  196. color: #fff;
  197. display: inline-block;
  198. align-items: center;
  199. justify-content: center;
  200. width: auto;
  201. max-width: 180rpx;
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. white-space: nowrap;
  205. }
  206. .spu .item-top .spu-active .tag-green {
  207. background: linear-gradient(to left, #46c8d0, #29ba9a);
  208. }
  209. .spu .spu-content .time-tip {
  210. position: absolute;
  211. background: #ff5344;
  212. left: 0;
  213. bottom: 0;
  214. width: 250rpx;
  215. height: 40rpx;
  216. border-radius: 0 8rpx 0 0;
  217. }
  218. .spu .spu-content .time-tip.notip {
  219. display: none;
  220. }
  221. /* 标签 */
  222. .spu .item-tag {
  223. position: absolute;
  224. left: 22rpx;
  225. top: 0;
  226. width: 54rpx;
  227. height: 62rpx;
  228. z-index: 1;
  229. color: #fff;
  230. text-align: center;
  231. }
  232. .item-tag-bg {
  233. position: absolute;
  234. left: 0;
  235. top: 0;
  236. width: 54rpx;
  237. height: 62rpx;
  238. z-index: 0;
  239. }
  240. .spu .item-tag .tag-name {
  241. position: relative;
  242. padding-top: 6rpx;
  243. font-size: 20rpx;
  244. line-height: 1;
  245. font-weight: 600;
  246. z-index: 1;
  247. }
  248. .spu .item-tag .tag-name.two-word {
  249. font-size: 22rpx;
  250. padding-top: 14rpx;
  251. }
  252. .spu .index-input-number {
  253. position: absolute;
  254. right: 0;
  255. bottom: 10rpx;
  256. display: flex;
  257. justify-content: center;
  258. align-items: center;
  259. }
  260. .spu .index-input-number .i-input-number-view {
  261. width: 80rpx;
  262. height: 80rpx;
  263. display: flex;
  264. justify-content: center;
  265. align-items: center;
  266. }
  267. .spu .index-input-number .i-input-number-view .img{
  268. width: 40rpx;
  269. height: 40rpx;
  270. }
  271. .spu .index-input-number .i-input-number-minus {
  272. justify-content: flex-end;
  273. }
  274. .spu .index-input-number .i-input-number-plus {
  275. justify-content: flex-start;
  276. }
  277. .spu .index-input-number .input-number-text {
  278. height: 88rpx;
  279. line-height: 88rpx;
  280. font-size: 24rpx;
  281. color: #333;
  282. width: 58rpx;
  283. }