category.css 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. * {
  2. font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, segoe ui, arial, roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
  3. }
  4. .category-page {
  5. display: flex;
  6. align-items: start;
  7. }
  8. .category-page-menu {
  9. min-width: calc(100% / 5 + 2.02666666vw);
  10. width: calc(100% / 5 + 2.02666666vw);
  11. min-height: calc(100VH - 15.666VW - 60px);
  12. height: 100%;
  13. display: block;
  14. background-color: #f0f0f0;
  15. }
  16. .category-menu-item {
  17. width: 100%;
  18. height: calc(10VH - 1.5666VW - 6px);
  19. line-height: calc(10VH - 1.5666VW - 6px);
  20. text-align: center;
  21. }
  22. .category-menu-item-select {
  23. background-color: white;
  24. }
  25. .category-page-body {
  26. display: grid;
  27. grid-template-columns: repeat(3, 24VW );
  28. gap: 10px;
  29. }
  30. .category-page-body .category-page-item {
  31. padding: 10px;
  32. display: flex;
  33. flex-direction: column;
  34. justify-content: start;
  35. }
  36. .category-page-body .category-page-item .category-page-item-image {
  37. width: calc(24VW - 20px);
  38. height: calc(24VW - 20px);
  39. border-radius: calc(5VW - 4px);
  40. }
  41. .category-page-body .category-page-item .category-page-item-image img {
  42. border-radius: inherit;
  43. width: 100%;
  44. height: 100%;
  45. }
  46. .category-page-body .category-page-item .category-page-item-name {
  47. margin-top: calc(1.6VW);
  48. font-weight: bold;
  49. line-height: 1.5;
  50. display: -webkit-box; /* 创建弹性盒子模型 */
  51. -webkit-box-orient: vertical; /* 垂直排列子元素 */
  52. overflow: hidden; /* 隐藏溢出的内容 */
  53. text-overflow: ellipsis; /* 溢出的部分显示省略号 */
  54. -webkit-line-clamp: 3; /* 限制显示的行数,这里限制为3行 */
  55. max-height: calc(1.5em * 3); /* 计算出元素的最大高度(行高乘以行数) */
  56. }
  57. .category-page-goods-detail {
  58. position: fixed;
  59. top: 0;
  60. bottom: 0;
  61. left: 0;
  62. right: 0;
  63. width: 100VW;
  64. height: 100VH;
  65. display: block;
  66. background-color: white;
  67. z-index: 12;
  68. }
  69. .category-page-goods-detail .category-goods-detail-header {
  70. width: 100VW;
  71. height: 13VW;
  72. background-color: #dddddd;
  73. position: fixed;
  74. top: 0;
  75. left: 0;
  76. right: 0;
  77. }
  78. .category-page-goods-detail .category-goods-detail-header-interval {
  79. height: 13VW;
  80. }
  81. .category-page-goods-detail .category-goods-detail-header .header-return {
  82. width: 6VW;
  83. height: 6VW;
  84. position: fixed;
  85. font-size: 24px;
  86. line-height: 6VW;
  87. text-align: center;
  88. color: #666666;
  89. padding: 2VW;
  90. margin: 1.5VW;
  91. border-radius: 50%;
  92. user-select: none;
  93. }
  94. .category-page-goods-detail .category-goods-detail-header .header-return::after {
  95. content: "<";
  96. }
  97. .category-page-goods-detail .category-goods-detail-header .header-title {
  98. height: 6VW;
  99. font-size: 1.6em;
  100. line-height: 6VW;
  101. text-align: center;
  102. color: #666666;
  103. padding: 0 15VW;
  104. margin: 3.5VW 1.5VW;
  105. border-radius: 50%;
  106. user-select: none;
  107. display: -webkit-box; /* 创建弹性盒子模型 */
  108. -webkit-box-orient: vertical; /* 垂直排列子元素 */
  109. overflow: hidden; /* 隐藏溢出的内容 */
  110. text-overflow: ellipsis; /* 溢出的部分显示省略号 */
  111. -webkit-line-clamp: 1; /* 限制显示的行数,这里限制为3行 */
  112. max-height: calc(1.5em * 3); /* 计算出元素的最大高度(行高乘以行数) */
  113. }
  114. .category-page-goods-detail .category-goods-detail-handler {
  115. margin: 3VW 0 6VW;
  116. height: 7VW;
  117. line-height: 7VW;
  118. width: calc(100% - 8VW);
  119. display: flex;
  120. padding: 0 4VW;
  121. justify-content: space-evenly;
  122. }
  123. .category-page-goods-detail .category-goods-detail-handler .cgdh-tab-item {
  124. background-color: #f0f0f0;
  125. padding: 0 2.6VW;
  126. font-size: 3.4VW;
  127. color: #444444;
  128. border-radius: 1.1VW;
  129. }
  130. .category-page-goods-detail .category-goods-detail-handler .cgdh-tab-item-selected {
  131. /*反色*/
  132. /*filter: invert(0.9);*/
  133. background-color: #444444;
  134. color: #f0f0f0;
  135. }
  136. .category-page-goods-detail .category-goods-detail-skus {
  137. display: flex;
  138. flex-direction: column;
  139. align-items: start;
  140. }
  141. .category-page-goods-detail .category-goods-detail-skus .category-goods-detail-sku {
  142. margin: 0 auto 5.2VW;
  143. display: flex;
  144. width: 92VW;
  145. }
  146. .category-page-goods-detail .category-goods-detail-skus .cgds-left-img {
  147. display: flex;
  148. width: 22VW;
  149. height: 29.5VW;
  150. border-radius: 1.1VW;
  151. background-color: #444444;
  152. flex-direction: column;
  153. align-items: start;
  154. margin-right: 3.2VW;
  155. }
  156. .category-page-goods-detail .category-goods-detail-skus .cgds-left-img img {
  157. width: 100%;
  158. height: 100%;
  159. border-radius: inherit;
  160. box-shadow: #444444 0 0 5px;
  161. }
  162. .category-page-goods-detail .category-goods-detail-skus .cgds-right-detail {
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: space-between;
  166. }
  167. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-name {
  168. color: #1a1a1a;
  169. font-size: 4VW;
  170. font-weight: bold;
  171. line-height: 5.05VW;
  172. }
  173. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-salesnum {
  174. font-size: 3.5VW;
  175. color: #aaaaaa;
  176. font-weight: bold;
  177. height: 14.4VW;
  178. }
  179. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-price {
  180. height: 6.4VW;
  181. line-height: 6.4VW;
  182. display: flex;
  183. font-size: 4.3VW;
  184. font-weight: bold;
  185. }
  186. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-price .cgds-right-detail-price-now {
  187. color: #ea0000;
  188. font-size: 4.3VW;
  189. font-weight: bold;
  190. }
  191. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-price .cgds-right-detail-price-now::before {
  192. content: "¥";
  193. }
  194. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-price .cgds-right-detail-price-history {
  195. display: flex;
  196. color: #aaaaaa;
  197. font-size: 3.2VW;
  198. font-weight: bold;
  199. /* 删除线*/
  200. text-decoration: line-through;
  201. padding: 0 10px;
  202. }
  203. .category-goods-detail-sku .cgds-right-detail .cgds-right-detail-price .cgds-right-detail-price-history::before {
  204. content: "¥";
  205. }