register.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .register-container {
  2. min-height: 100vh;
  3. display: flex;
  4. align-items: center;
  5. justify-content: center;
  6. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  7. padding: 20px;
  8. }
  9. .register-card {
  10. background: white;
  11. border-radius: 16px;
  12. box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  13. padding: 40px;
  14. width: 100%;
  15. max-width: 480px;
  16. animation: slideUp 0.6s ease-out;
  17. }
  18. @keyframes slideUp {
  19. from {
  20. opacity: 0;
  21. transform: translateY(30px);
  22. }
  23. to {
  24. opacity: 1;
  25. transform: translateY(0);
  26. }
  27. }
  28. .register-header {
  29. text-align: center;
  30. margin-bottom: 32px;
  31. h1 {
  32. color: #2d3748;
  33. font-size: 28px;
  34. font-weight: 700;
  35. margin: 0 0 8px 0;
  36. }
  37. p {
  38. color: #718096;
  39. font-size: 16px;
  40. margin: 0;
  41. }
  42. }
  43. .register-form {
  44. .form-group {
  45. margin-bottom: 20px;
  46. label {
  47. display: block;
  48. color: #4a5568;
  49. font-weight: 600;
  50. margin-bottom: 8px;
  51. font-size: 14px;
  52. }
  53. .form-control {
  54. width: 100%;
  55. padding: 12px 16px;
  56. border: 2px solid #e2e8f0;
  57. border-radius: 8px;
  58. font-size: 16px;
  59. transition: all 0.3s ease;
  60. box-sizing: border-box;
  61. &:focus {
  62. outline: none;
  63. border-color: #667eea;
  64. box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  65. }
  66. &::placeholder {
  67. color: #a0aec0;
  68. }
  69. }
  70. select.form-control {
  71. cursor: pointer;
  72. background-color: white;
  73. }
  74. }
  75. .error-message {
  76. background-color: #fed7d7;
  77. color: #c53030;
  78. padding: 12px 16px;
  79. border-radius: 8px;
  80. margin-bottom: 20px;
  81. font-size: 14px;
  82. border: 1px solid #feb2b2;
  83. }
  84. .submit-btn {
  85. width: 100%;
  86. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  87. color: white;
  88. border: none;
  89. padding: 14px 24px;
  90. border-radius: 8px;
  91. font-size: 16px;
  92. font-weight: 600;
  93. cursor: pointer;
  94. transition: all 0.3s ease;
  95. display: flex;
  96. align-items: center;
  97. justify-content: center;
  98. gap: 8px;
  99. &:hover:not(:disabled) {
  100. transform: translateY(-2px);
  101. box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  102. }
  103. &:disabled {
  104. opacity: 0.6;
  105. cursor: not-allowed;
  106. transform: none;
  107. }
  108. .loading-spinner {
  109. width: 16px;
  110. height: 16px;
  111. border: 2px solid transparent;
  112. border-top: 2px solid white;
  113. border-radius: 50%;
  114. animation: spin 1s linear infinite;
  115. }
  116. }
  117. .login-link {
  118. text-align: center;
  119. margin-top: 24px;
  120. color: #718096;
  121. font-size: 14px;
  122. a {
  123. color: #667eea;
  124. text-decoration: none;
  125. font-weight: 600;
  126. transition: color 0.3s ease;
  127. &:hover {
  128. color: #5a67d8;
  129. text-decoration: underline;
  130. }
  131. }
  132. }
  133. }
  134. @keyframes spin {
  135. 0% { transform: rotate(0deg); }
  136. 100% { transform: rotate(360deg); }
  137. }
  138. // 响应式设计
  139. @media (max-width: 768px) {
  140. .register-container {
  141. padding: 16px;
  142. }
  143. .register-card {
  144. padding: 24px;
  145. margin: 0;
  146. }
  147. .register-header {
  148. margin-bottom: 24px;
  149. h1 {
  150. font-size: 24px;
  151. }
  152. p {
  153. font-size: 14px;
  154. }
  155. }
  156. .register-form {
  157. .form-group {
  158. margin-bottom: 16px;
  159. .form-control {
  160. padding: 10px 14px;
  161. font-size: 16px; // 防止iOS缩放
  162. }
  163. }
  164. .submit-btn {
  165. padding: 12px 20px;
  166. font-size: 16px;
  167. }
  168. }
  169. }