style.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /* 全局样式 */
  2. body {
  3. font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  4. line-height: 1.6;
  5. color: #333;
  6. background-color: #f8f9fa;
  7. }
  8. /* 导航栏样式 */
  9. .navbar-brand {
  10. font-weight: bold;
  11. font-size: 1.5rem;
  12. }
  13. .navbar-nav .nav-link {
  14. font-weight: 500;
  15. transition: color 0.3s ease;
  16. }
  17. .navbar-nav .nav-link:hover {
  18. color: #007bff !important;
  19. }
  20. /* 卡片样式 */
  21. .card {
  22. border: none;
  23. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  24. transition: transform 0.3s ease, box-shadow 0.3s ease;
  25. margin-bottom: 20px;
  26. }
  27. .card:hover {
  28. transform: translateY(-5px);
  29. box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  30. }
  31. .card-title {
  32. color: #007bff;
  33. font-weight: 600;
  34. }
  35. /* 按钮样式 */
  36. .btn {
  37. border-radius: 50px;
  38. padding: 8px 20px;
  39. font-weight: 500;
  40. transition: all 0.3s ease;
  41. }
  42. .btn-primary {
  43. background-color: #007bff;
  44. border-color: #007bff;
  45. }
  46. .btn-primary:hover {
  47. background-color: #0069d9;
  48. border-color: #0069d9;
  49. transform: translateY(-2px);
  50. }
  51. .btn-outline-primary {
  52. color: #007bff;
  53. border-color: #007bff;
  54. }
  55. .btn-outline-primary:hover {
  56. background-color: #007bff;
  57. border-color: #007bff;
  58. transform: translateY(-2px);
  59. }
  60. /* 表单样式 */
  61. .form-control {
  62. border-radius: 10px;
  63. border: 1px solid #ced4da;
  64. padding: 10px 15px;
  65. transition: border-color 0.3s ease, box-shadow 0.3s ease;
  66. }
  67. .form-control:focus {
  68. border-color: #007bff;
  69. box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  70. }
  71. .form-label {
  72. font-weight: 600;
  73. color: #495057;
  74. }
  75. /* 商品卡片样式 */
  76. .product-card {
  77. height: 100%;
  78. display: flex;
  79. flex-direction: column;
  80. }
  81. .product-card .card-img-top {
  82. height: 200px;
  83. object-fit: cover;
  84. border-top-left-radius: 10px;
  85. border-top-right-radius: 10px;
  86. }
  87. .product-card .card-body {
  88. flex-grow: 1;
  89. display: flex;
  90. flex-direction: column;
  91. }
  92. .product-card .card-text {
  93. flex-grow: 1;
  94. }
  95. .product-price {
  96. font-size: 1.25rem;
  97. font-weight: 700;
  98. color: #dc3545;
  99. }
  100. /* 购物车样式 */
  101. .cart-item {
  102. border-bottom: 1px solid #dee2e6;
  103. padding: 15px 0;
  104. }
  105. .cart-item:last-child {
  106. border-bottom: none;
  107. }
  108. .cart-item img {
  109. width: 80px;
  110. height: 80px;
  111. object-fit: cover;
  112. border-radius: 8px;
  113. }
  114. /* 订单状态样式 */
  115. .order-status {
  116. padding: 5px 10px;
  117. border-radius: 20px;
  118. font-size: 0.875rem;
  119. font-weight: 600;
  120. }
  121. .status-pending {
  122. background-color: #ffc107;
  123. color: #212529;
  124. }
  125. .status-processing {
  126. background-color: #17a2b8;
  127. color: white;
  128. }
  129. .status-shipped {
  130. background-color: #6c757d;
  131. color: white;
  132. }
  133. .status-delivered {
  134. background-color: #28a745;
  135. color: white;
  136. }
  137. .status-cancelled {
  138. background-color: #dc3545;
  139. color: white;
  140. }
  141. /* 分页样式 */
  142. .pagination .page-link {
  143. border-radius: 50px;
  144. margin: 0 3px;
  145. color: #007bff;
  146. }
  147. .pagination .page-item.active .page-link {
  148. background-color: #007bff;
  149. border-color: #007bff;
  150. }
  151. /* 响应式调整 */
  152. @media (max-width: 768px) {
  153. .jumbotron {
  154. padding: 2rem !important;
  155. }
  156. .display-4 {
  157. font-size: 2.5rem;
  158. }
  159. .card {
  160. margin-bottom: 15px;
  161. }
  162. }
  163. /* 加载动画 */
  164. .loading {
  165. display: inline-block;
  166. width: 20px;
  167. height: 20px;
  168. border: 3px solid rgba(0, 123, 255, 0.3);
  169. border-radius: 50%;
  170. border-top-color: #007bff;
  171. animation: spin 1s ease-in-out infinite;
  172. }
  173. @keyframes spin {
  174. to { transform: rotate(360deg); }
  175. }
  176. /* 提示消息样式 */
  177. .alert {
  178. border-radius: 10px;
  179. border: none;
  180. padding: 15px 20px;
  181. }
  182. .alert-success {
  183. background-color: rgba(40, 167, 69, 0.1);
  184. color: #28a745;
  185. }
  186. .alert-danger {
  187. background-color: rgba(220, 53, 69, 0.1);
  188. color: #dc3545;
  189. }
  190. .alert-warning {
  191. background-color: rgba(255, 193, 7, 0.1);
  192. color: #ffc107;
  193. }
  194. .alert-info {
  195. background-color: rgba(23, 162, 184, 0.1);
  196. color: #17a2b8;
  197. }
  198. /* 表格样式 */
  199. .table {
  200. border-radius: 10px;
  201. overflow: hidden;
  202. box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  203. }
  204. .table thead th {
  205. background-color: #007bff;
  206. color: white;
  207. border: none;
  208. }
  209. .table tbody tr:hover {
  210. background-color: rgba(0, 123, 255, 0.05);
  211. }
  212. /* 模态框样式 */
  213. .modal-content {
  214. border-radius: 15px;
  215. border: none;
  216. box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  217. }
  218. .modal-header {
  219. border-bottom: 1px solid #dee2e6;
  220. border-top-left-radius: 15px;
  221. border-top-right-radius: 15px;
  222. background-color: #f8f9fa;
  223. }
  224. .modal-footer {
  225. border-top: 1px solid #dee2e6;
  226. border-bottom-left-radius: 15px;
  227. border-bottom-right-radius: 15px;
  228. background-color: #f8f9fa;
  229. }