styles.css 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  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: 600px;
  143. margin: 0 auto;
  144. padding: 20px;
  145. }
  146. form label {
  147. display: block;
  148. margin-bottom: 25px;
  149. }
  150. form label span {
  151. display: block;
  152. margin-bottom: 8px;
  153. color: #2c3e50;
  154. font-weight: 500;
  155. font-size: 16px;
  156. }
  157. form input {
  158. width: 100%;
  159. padding: 12px 15px;
  160. border: 2px solid #e0e0e0;
  161. border-radius: 8px;
  162. font-size: 15px;
  163. transition: all 0.3s ease;
  164. }
  165. form input:focus {
  166. border-color: #3498db;
  167. outline: none;
  168. box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
  169. }
  170. form button[type="submit"] {
  171. width: 100%;
  172. padding: 12px;
  173. background-color: #3498db;
  174. color: white;
  175. border: none;
  176. border-radius: 8px;
  177. font-size: 16px;
  178. cursor: pointer;
  179. transition: all 0.3s ease;
  180. }
  181. form button[type="submit"]:hover {
  182. background-color: #2980b9;
  183. }
  184. /* 添加返回按钮样式 */
  185. a.button {
  186. display: inline-block;
  187. background-color: #95a5a6;
  188. text-decoration: none;
  189. }
  190. a.button:hover {
  191. background-color: #7f8c8d;
  192. }
  193. /* 针对不同类型输入框的特殊样式 */
  194. input[type="date"] {
  195. font-family: inherit;
  196. color: #2c3e50;
  197. }
  198. input[type="number"] {
  199. text-align: right;
  200. padding-right: 25px;
  201. }
  202. input[name="repaymentMethod"] {
  203. color: #666;
  204. }
  205. /* 提交按钮容器 */
  206. .form-buttons {
  207. margin-top: 30px;
  208. display: flex;
  209. gap: 15px;
  210. justify-content: flex-start;
  211. }
  212. .form-buttons button,
  213. .form-buttons a.button {
  214. min-width: 120px;
  215. padding: 12px 25px;
  216. }