styles.css 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. /* 全局样式 */
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. font-family: 'Microsoft YaHei', sans-serif;
  7. }
  8. body {
  9. background-color: #f5f7fa;
  10. min-height: 100vh;
  11. padding: 20px;
  12. }
  13. .container {
  14. max-width: 1000px;
  15. margin: 0 auto;
  16. padding: 30px;
  17. background: white;
  18. border-radius: 15px;
  19. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  20. }
  21. /* 标题样式 */
  22. h1 {
  23. color: #2c3e50;
  24. text-align: center;
  25. margin-bottom: 30px;
  26. font-size: 2.2em;
  27. }
  28. /* 搜索表单样式 */
  29. #searchForm {
  30. display: flex;
  31. gap: 15px;
  32. margin-bottom: 30px;
  33. justify-content: center;
  34. }
  35. .search-bar {
  36. padding: 12px 20px;
  37. border: 2px solid #e0e0e0;
  38. border-radius: 8px;
  39. width: 300px;
  40. font-size: 16px;
  41. transition: all 0.3s ease;
  42. }
  43. .search-bar:focus {
  44. border-color: #3498db;
  45. outline: none;
  46. box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
  47. }
  48. .button {
  49. padding: 12px 25px;
  50. border: none;
  51. border-radius: 8px;
  52. font-size: 16px;
  53. cursor: pointer;
  54. transition: all 0.3s ease;
  55. color: white;
  56. }
  57. button[onclick="searchDebt()"] {
  58. background-color: #3498db;
  59. }
  60. button[onclick="searchDebt()"]:hover {
  61. background-color: #2980b9;
  62. }
  63. #addRecordBtn {
  64. background-color: #2ecc71;
  65. }
  66. #addRecordBtn:hover {
  67. background-color: #27ae60;
  68. }
  69. /* 搜索结果样式 */
  70. .search-result {
  71. background: white;
  72. border-radius: 10px;
  73. padding: 20px;
  74. margin-top: 20px;
  75. }
  76. .result-header {
  77. border-bottom: 2px solid #f0f0f0;
  78. padding-bottom: 15px;
  79. margin-bottom: 20px;
  80. }
  81. .debtor-name {
  82. color: #2c3e50;
  83. font-size: 1.8em;
  84. margin-bottom: 10px;
  85. }
  86. .remaining-debt {
  87. font-size: 1.2em;
  88. color: #7f8c8d;
  89. }
  90. .amount {
  91. color: #e74c3c;
  92. font-weight: bold;
  93. }
  94. /* 还款记录样式 */
  95. .repayment-section h3 {
  96. color: #2c3e50;
  97. margin-bottom: 15px;
  98. }
  99. .repayment-list {
  100. display: flex;
  101. flex-direction: column;
  102. gap: 15px;
  103. }
  104. .repayment-item {
  105. background: #f8f9fa;
  106. border-radius: 8px;
  107. padding: 15px;
  108. transition: all 0.3s ease;
  109. }
  110. .repayment-item:hover {
  111. transform: translateX(5px);
  112. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  113. }
  114. .repayment-date {
  115. color: #34495e;
  116. font-weight: bold;
  117. margin-bottom: 10px;
  118. }
  119. .repayment-details {
  120. display: grid;
  121. grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  122. gap: 10px;
  123. }
  124. .label {
  125. color: #7f8c8d;
  126. margin-right: 5px;
  127. }
  128. /* 错误提示样式 */
  129. .no-result, .no-input {
  130. text-align: center;
  131. padding: 30px;
  132. color: #7f8c8d;
  133. font-size: 1.1em;
  134. }
  135. .no-result i, .no-input i {
  136. font-size: 2em;
  137. margin-bottom: 10px;
  138. color: #e74c3c;
  139. }
  140. /* 新增记录表单样式 */
  141. form {
  142. max-width: 500px;
  143. margin: 0 auto;
  144. }
  145. form label {
  146. display: block;
  147. margin-bottom: 20px;
  148. color: #2c3e50;
  149. }
  150. form input {
  151. width: 100%;
  152. padding: 10px;
  153. border: 2px solid #e0e0e0;
  154. border-radius: 8px;
  155. margin-top: 5px;
  156. font-size: 16px;
  157. }
  158. form input:focus {
  159. border-color: #3498db;
  160. outline: none;
  161. box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
  162. }
  163. form button[type="submit"] {
  164. width: 100%;
  165. padding: 12px;
  166. background-color: #3498db;
  167. color: white;
  168. border: none;
  169. border-radius: 8px;
  170. font-size: 16px;
  171. cursor: pointer;
  172. transition: all 0.3s ease;
  173. }
  174. form button[type="submit"]:hover {
  175. background-color: #2980b9;
  176. }
  177. /* 添加返回按钮样式 */
  178. a.button {
  179. display: inline-block;
  180. background-color: #95a5a6;
  181. text-decoration: none;
  182. }
  183. a.button:hover {
  184. background-color: #7f8c8d;
  185. }