刘嘉昕 | 07fee5f | 2025-06-09 17:18:47 +0800 | [diff] [blame] | 1 | /* 模态框遮罩层 */ |
| 2 | .modal-overlay { |
| 3 | position: fixed; |
| 4 | top: 0; |
| 5 | left: 0; |
| 6 | right: 0; |
| 7 | bottom: 0; |
| 8 | background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */ |
| 9 | display: flex; |
| 10 | justify-content: center; |
| 11 | align-items: center; |
| 12 | z-index: 1000; /* 确保在最上层 */ |
| 13 | } |
| 14 | |
| 15 | /* 模态框内容 */ |
| 16 | .modal-content { |
| 17 | background-color: white; |
| 18 | border-radius: 12px; |
| 19 | box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); |
| 20 | width: 90%; |
| 21 | max-width: 500px; /* 最大宽度 */ |
| 22 | overflow: hidden; |
| 23 | animation: fadeInUp 0.3s ease-out; /* 淡入动画 */ |
| 24 | } |
| 25 | |
| 26 | /* 模态框头部 */ |
| 27 | .modal-header { |
| 28 | display: flex; |
| 29 | justify-content: space-between; |
| 30 | align-items: center; |
| 31 | padding: 16px 20px; |
| 32 | background-color: #e6f0ff; /* 浅蓝色背景 */ |
| 33 | border-bottom: 1px solid #d0e3ff; |
| 34 | } |
| 35 | |
| 36 | .modal-header h3 { |
| 37 | margin: 0; |
| 38 | font-size: 18px; |
| 39 | font-weight: 600; |
| 40 | color: #0066cc; /* 蓝色标题 */ |
| 41 | } |
| 42 | |
| 43 | .close-btn { |
| 44 | background: none; |
| 45 | border: none; |
| 46 | font-size: 24px; |
| 47 | cursor: pointer; |
| 48 | color: #666; |
| 49 | } |
| 50 | |
| 51 | .close-btn:hover { |
| 52 | color: #000; |
| 53 | } |
| 54 | |
| 55 | /* 模态框主体 */ |
| 56 | .modal-body { |
| 57 | padding: 20px; |
| 58 | } |
| 59 | |
| 60 | .modal-body p { |
| 61 | margin: 0; |
| 62 | font-size: 16px; |
| 63 | color: #333; |
| 64 | } |
| 65 | |
| 66 | .highlight { |
| 67 | font-weight: 600; |
| 68 | color: #0066cc; /* 蓝色高亮 */ |
| 69 | } |
| 70 | |
| 71 | /* 模态框底部 */ |
| 72 | .modal-footer { |
| 73 | display: flex; |
| 74 | justify-content: flex-end; |
| 75 | gap: 10px; |
| 76 | padding: 16px 20px; |
| 77 | background-color: #f5f5f5; |
| 78 | } |
| 79 | |
| 80 | /* 按钮样式 */ |
| 81 | .btn-cancel { |
| 82 | padding: 8px 16px; |
| 83 | border: 1px solid #ccc; |
| 84 | background: white; |
| 85 | border-radius: 6px; |
| 86 | cursor: pointer; |
| 87 | transition: all 0.2s; |
| 88 | } |
| 89 | |
| 90 | .btn-cancel:hover { |
| 91 | background: #f0f0f0; |
| 92 | } |
| 93 | |
| 94 | .btn-confirm { |
| 95 | padding: 8px 16px; |
| 96 | background-color: #0066cc; /* 蓝色按钮 */ |
| 97 | color: white; |
| 98 | border: none; |
| 99 | border-radius: 6px; |
| 100 | cursor: pointer; |
| 101 | transition: all 0.2s; |
| 102 | } |
| 103 | |
| 104 | .btn-confirm:hover { |
| 105 | background-color: #0052a3; /* 深蓝色 */ |
| 106 | } |
| 107 | |
| 108 | /* 动画 */ |
| 109 | @keyframes fadeInUp { |
| 110 | from { |
| 111 | opacity: 0; |
| 112 | transform: translateY(10px); |
| 113 | } |
| 114 | to { |
| 115 | opacity: 1; |
| 116 | transform: translateY(0); |
| 117 | } |
| 118 | } |