productdetails.wxss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. .goodslist_boxs {
  2. margin: 0rpx 30rpx;
  3. width: calc(100% - 60rpx);
  4. height: calc( 100vh - 40rpx);
  5. }
  6. .goods-image {
  7. width: 100%;
  8. height: 400rpx;
  9. }
  10. .price-and-views {
  11. display: flex;
  12. justify-content: space-between;
  13. align-items: center;
  14. padding: 20rpx;
  15. }
  16. .price {
  17. color: #ff5722;
  18. font-size: 32rpx;
  19. }
  20. .original-price {
  21. color: #999;
  22. font-size: 24rpx;
  23. margin-left: 20rpx;
  24. text-decoration: line-through;
  25. }
  26. .views {
  27. color: #999;
  28. font-size: 24rpx;
  29. }
  30. .goods-title {
  31. padding: 0 20rpx;
  32. font-size: 32rpx;
  33. font-weight: bold;
  34. }
  35. .specifications {
  36. margin: 20rpx 0;
  37. padding: 20rpx;
  38. background: #fff;
  39. border-radius: 16rpx;
  40. }
  41. .specifications_boxs {
  42. width: 100%;
  43. height: 80%;
  44. margin-top: 20rpx;
  45. display: flex;
  46. flex-wrap: wrap; /* 允许内容自动换行 */
  47. justify-content: flex-start; /* 靠右排列 */
  48. align-content: flex-start;
  49. gap: 20rpx; /* 设置项目之间的间距 */
  50. }
  51. .spec-btn {
  52. width: 48% !important;
  53. margin-bottom: 20rpx; /* 设置底部边距,确保换行后有间距 */
  54. padding: 10rpx 20rpx;
  55. border: 1px solid #ccc;
  56. border-radius: 50rpx;
  57. font-size: 28rpx;
  58. white-space: nowrap; /* 防止文字换行 */
  59. }
  60. .spec-btn.active {
  61. background-color: #fff;
  62. color: #fff;
  63. border-color: #409eff;
  64. color: #409eff;
  65. }
  66. .quantity {
  67. display: flex;
  68. align-items: center;
  69. justify-content: space-between;
  70. padding: 20rpx;
  71. background: #fff;
  72. border-radius: 16rpx;
  73. }
  74. .quantity-controls {
  75. display: flex;
  76. align-items: center;
  77. }
  78. .quantity-btn {
  79. width: 60rpx;
  80. height: 60rpx;
  81. background-color: #f5f5f5;
  82. border: none;
  83. font-size: 40rpx;
  84. color: #999;
  85. }
  86. .quantity-input {
  87. width: 80rpx;
  88. height: 60rpx;
  89. text-align: center;
  90. font-size: 32rpx;
  91. margin: 0 10rpx;
  92. }
  93. .product-details {
  94. padding: 20rpx;
  95. background: #fff;
  96. border-radius: 16rpx;
  97. margin-top: 20rpx;
  98. }
  99. .details-list text {
  100. margin-top: 20rpx;
  101. display: block;
  102. margin-bottom: 10rpx;
  103. font-size: 30rpx;
  104. color: #666;
  105. }
  106. .buttons {
  107. width: 100%;
  108. display: flex;
  109. justify-content: space-around;
  110. padding: 20rpx;
  111. position: fixed;
  112. bottom: 0;
  113. left: 0;
  114. background: #fff;
  115. padding-bottom: 40rpx;
  116. padding-top: 20rpx;
  117. }
  118. .cart-btn, .buy-btn {
  119. width: 40%;
  120. height: 80rpx;
  121. border-radius: 50rpx;
  122. font-size: 32rpx;
  123. color: #fff;
  124. }
  125. .cart-btn {
  126. width: 260rpx !important;
  127. background-color: #ea0000;
  128. }
  129. .buy-btn {
  130. width: 260rpx !important;
  131. background-color: #409eff;
  132. }
  133. .search-icon {
  134. width: 50rpx;
  135. height: 50rpx;
  136. }