modal.css 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. /* 自定义弹框样式 */
  2. .custom-modal {
  3. position: fixed;
  4. top: 0;
  5. left: 0;
  6. width: 100%;
  7. height: 100%;
  8. z-index: 10000;
  9. display: none;
  10. align-items: center;
  11. justify-content: center;
  12. opacity: 0;
  13. visibility: hidden;
  14. transition: all 0.3s ease;
  15. }
  16. .custom-modal.show {
  17. display: flex;
  18. opacity: 1;
  19. visibility: visible;
  20. }
  21. .modal-overlay {
  22. position: absolute;
  23. top: 0;
  24. left: 0;
  25. width: 100%;
  26. height: 100%;
  27. background: rgba(0, 0, 0, 0.5);
  28. backdrop-filter: blur(4px);
  29. -webkit-backdrop-filter: blur(4px);
  30. }
  31. .modal-content {
  32. position: relative;
  33. background: #ffffff;
  34. border: 1px solid #e5e7eb;
  35. border-radius: 16px;
  36. box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  37. backdrop-filter: none;
  38. -webkit-backdrop-filter: none;
  39. max-width: 480px;
  40. width: 90%;
  41. max-height: 90vh;
  42. overflow: hidden;
  43. transform: scale(0.9) translateY(20px);
  44. transition: all 0.3s ease;
  45. }
  46. .custom-modal.show .modal-content {
  47. transform: scale(1) translateY(0);
  48. }
  49. .modal-header {
  50. display: flex;
  51. align-items: center;
  52. justify-content: space-between;
  53. padding: 24px 24px 0 24px;
  54. border-bottom: 1px solid #e5e7eb;
  55. margin-bottom: 24px;
  56. }
  57. .modal-title {
  58. font-size: 20px;
  59. font-weight: 600;
  60. color: #111827;
  61. margin: 0;
  62. }
  63. .modal-close {
  64. background: none;
  65. border: none;
  66. color: #6b7280;
  67. cursor: pointer;
  68. padding: 8px;
  69. border-radius: 8px;
  70. transition: all 0.2s ease;
  71. display: flex;
  72. align-items: center;
  73. justify-content: center;
  74. }
  75. .modal-close:hover {
  76. background: #f3f4f6;
  77. color: #374151;
  78. }
  79. .modal-body {
  80. padding: 0 24px 24px 24px;
  81. text-align: center;
  82. }
  83. .modal-icon {
  84. display: flex;
  85. align-items: center;
  86. justify-content: center;
  87. margin-bottom: 20px;
  88. }
  89. .modal-icon.delete-icon {
  90. color: #ef4444;
  91. }
  92. .modal-icon.rename-icon {
  93. color: #3b82f6;
  94. }
  95. .modal-icon.message-icon {
  96. color: #10b981;
  97. }
  98. .modal-message {
  99. font-size: 16px;
  100. color: #374151;
  101. margin: 0;
  102. line-height: 1.5;
  103. }
  104. .form-group {
  105. text-align: left;
  106. margin-top: 20px;
  107. }
  108. .form-label {
  109. display: block;
  110. font-size: 14px;
  111. font-weight: 500;
  112. color: #374151;
  113. margin-bottom: 8px;
  114. }
  115. .form-input {
  116. width: 100%;
  117. padding: 12px 16px;
  118. background: #ffffff;
  119. border: 1px solid #d1d5db;
  120. border-radius: 8px;
  121. color: #111827;
  122. font-size: 16px;
  123. transition: all 0.2s ease;
  124. box-sizing: border-box;
  125. }
  126. .form-input:focus {
  127. outline: none;
  128. border-color: #3b82f6;
  129. background: #ffffff;
  130. box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  131. }
  132. .form-input::placeholder {
  133. color: #9ca3af;
  134. }
  135. .form-hint {
  136. font-size: 12px;
  137. color: #6b7280;
  138. margin-top: 4px;
  139. }
  140. .modal-footer {
  141. display: flex;
  142. gap: 12px;
  143. padding: 0 24px 24px 24px;
  144. justify-content: flex-end;
  145. }
  146. .btn {
  147. padding: 12px 24px;
  148. border: none;
  149. border-radius: 8px;
  150. font-size: 14px;
  151. font-weight: 500;
  152. cursor: pointer;
  153. transition: all 0.2s ease;
  154. min-width: 80px;
  155. }
  156. .btn-primary {
  157. background: #3b82f6;
  158. color: white;
  159. }
  160. .btn-primary:hover {
  161. background: #2563eb;
  162. transform: translateY(-1px);
  163. }
  164. .btn-secondary {
  165. background: #f9fafb;
  166. color: #374151;
  167. border: 1px solid #d1d5db;
  168. }
  169. .btn-secondary:hover {
  170. background: #f3f4f6;
  171. transform: translateY(-1px);
  172. }
  173. .btn-danger {
  174. background: #ef4444;
  175. color: white;
  176. }
  177. .btn-danger:hover {
  178. background: #dc2626;
  179. transform: translateY(-1px);
  180. }
  181. .btn:active {
  182. transform: translateY(0);
  183. }
  184. /* 消息弹框特殊样式 */
  185. .message-modal-content {
  186. max-width: 360px;
  187. }
  188. .message-modal-content .modal-body {
  189. padding: 24px;
  190. }
  191. .message-modal-content .modal-footer {
  192. padding: 0 24px 24px 24px;
  193. justify-content: center;
  194. }
  195. /* 响应式设计 */
  196. @media (max-width: 768px) {
  197. .modal-content {
  198. width: 95%;
  199. margin: 20px;
  200. }
  201. .modal-header {
  202. padding: 20px 20px 0 20px;
  203. }
  204. .modal-body {
  205. padding: 0 20px 20px 20px;
  206. }
  207. .modal-footer {
  208. padding: 0 20px 20px 20px;
  209. flex-direction: column;
  210. }
  211. .btn {
  212. width: 100%;
  213. }
  214. }