300 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
			
		
		
	
	
			300 lines
		
	
	
		
			7.8 KiB
		
	
	
	
		
			HTML
		
	
	
	
| <!DOCTYPE html>
 | ||
| <html lang="zh-CN">
 | ||
| <head>
 | ||
|     <meta charset="UTF-8">
 | ||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | ||
|     <title>成长值详情模态框 - 原型演示</title>
 | ||
|     <style>
 | ||
|         * {
 | ||
|             margin: 0;
 | ||
|             padding: 0;
 | ||
|             box-sizing: border-box;
 | ||
|         }
 | ||
| 
 | ||
|         body {
 | ||
|             font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
 | ||
|             background-color: #f5f5f5;
 | ||
|             padding: 20px;
 | ||
|             line-height: 1.6;
 | ||
|         }
 | ||
| 
 | ||
|         .demo-container {
 | ||
|             max-width: 800px;
 | ||
|             margin: 0 auto;
 | ||
|             text-align: center;
 | ||
|         }
 | ||
| 
 | ||
|         .demo-title {
 | ||
|             color: #666;
 | ||
|             margin-bottom: 30px;
 | ||
|             font-size: 24px;
 | ||
|             border: 1px dashed #ccc;
 | ||
|             padding: 20px;
 | ||
|             background: white;
 | ||
|         }
 | ||
| 
 | ||
|         .trigger-button {
 | ||
|             background: white;
 | ||
|             border: 1px dashed #ccc;
 | ||
|             padding: 12px 24px;
 | ||
|             font-size: 16px;
 | ||
|             cursor: pointer;
 | ||
|             color: #666;
 | ||
|             transition: background-color 0.2s;
 | ||
|         }
 | ||
| 
 | ||
|         .trigger-button:hover {
 | ||
|             background-color: #f9f9f9;
 | ||
|         }
 | ||
| 
 | ||
|         /* Modal Overlay */
 | ||
|         .modal-overlay {
 | ||
|             position: fixed;
 | ||
|             top: 0;
 | ||
|             left: 0;
 | ||
|             width: 100%;
 | ||
|             height: 100%;
 | ||
|             background-color: rgba(0, 0, 0, 0.5);
 | ||
|             display: none;
 | ||
|             justify-content: center;
 | ||
|             align-items: center;
 | ||
|             z-index: 1000;
 | ||
|         }
 | ||
| 
 | ||
|         .modal-overlay.show {
 | ||
|             display: flex;
 | ||
|         }
 | ||
| 
 | ||
|         /* Modal Container */
 | ||
|         .modal-container {
 | ||
|             background: white;
 | ||
|             border: 1px dashed #ccc;
 | ||
|             width: 90%;
 | ||
|             max-width: 400px;
 | ||
|             border-radius: 0;
 | ||
|             overflow: hidden;
 | ||
|             animation: modalAppear 0.3s ease-out;
 | ||
|         }
 | ||
| 
 | ||
|         @keyframes modalAppear {
 | ||
|             from {
 | ||
|                 opacity: 0;
 | ||
|                 transform: scale(0.9);
 | ||
|             }
 | ||
|             to {
 | ||
|                 opacity: 1;
 | ||
|                 transform: scale(1);
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         /* Modal Header */
 | ||
|         .modal-header {
 | ||
|             display: flex;
 | ||
|             justify-content: space-between;
 | ||
|             align-items: center;
 | ||
|             padding: 20px;
 | ||
|             border-bottom: 1px dashed #ccc;
 | ||
|             background: white;
 | ||
|         }
 | ||
| 
 | ||
|         .modal-title {
 | ||
|             font-size: 18px;
 | ||
|             font-weight: 500;
 | ||
|             color: #333;
 | ||
|         }
 | ||
| 
 | ||
|         .close-button {
 | ||
|             background: none;
 | ||
|             border: none;
 | ||
|             font-size: 24px;
 | ||
|             color: #999;
 | ||
|             cursor: pointer;
 | ||
|             width: 30px;
 | ||
|             height: 30px;
 | ||
|             display: flex;
 | ||
|             align-items: center;
 | ||
|             justify-content: center;
 | ||
|             border: 1px dashed transparent;
 | ||
|         }
 | ||
| 
 | ||
|         .close-button:hover {
 | ||
|             color: #666;
 | ||
|             border-color: #ccc;
 | ||
|         }
 | ||
| 
 | ||
|         /* Modal Content */
 | ||
|         .modal-content {
 | ||
|             padding: 20px;
 | ||
|         }
 | ||
| 
 | ||
|         .detail-item {
 | ||
|             display: flex;
 | ||
|             justify-content: space-between;
 | ||
|             align-items: center;
 | ||
|             margin-bottom: 16px;
 | ||
|             padding-bottom: 16px;
 | ||
|             border-bottom: 1px dashed #eee;
 | ||
|         }
 | ||
| 
 | ||
|         .detail-item:last-child {
 | ||
|             border-bottom: none;
 | ||
|             margin-bottom: 0;
 | ||
|             padding-bottom: 0;
 | ||
|         }
 | ||
| 
 | ||
|         .detail-label {
 | ||
|             color: #666;
 | ||
|             font-size: 14px;
 | ||
|         }
 | ||
| 
 | ||
|         .detail-value {
 | ||
|             color: #333;
 | ||
|             font-size: 14px;
 | ||
|             font-weight: 500;
 | ||
|         }
 | ||
| 
 | ||
|         .detail-value.positive {
 | ||
|             color: #22c55e;
 | ||
|             font-weight: 600;
 | ||
|         }
 | ||
| 
 | ||
|         /* Modal Footer */
 | ||
|         .modal-footer {
 | ||
|             background-color: #f8f9fa;
 | ||
|             padding: 16px 20px;
 | ||
|             border-top: 1px dashed #ccc;
 | ||
|         }
 | ||
| 
 | ||
|         .footer-description {
 | ||
|             color: #666;
 | ||
|             font-size: 13px;
 | ||
|             line-height: 1.5;
 | ||
|             text-align: left;
 | ||
|         }
 | ||
| 
 | ||
|         /* Responsive Design */
 | ||
|         @media (max-width: 480px) {
 | ||
|             .modal-container {
 | ||
|                 width: 95%;
 | ||
|                 margin: 20px;
 | ||
|             }
 | ||
| 
 | ||
|             .modal-header {
 | ||
|                 padding: 16px;
 | ||
|             }
 | ||
| 
 | ||
|             .modal-content {
 | ||
|                 padding: 16px;
 | ||
|             }
 | ||
| 
 | ||
|             .modal-footer {
 | ||
|                 padding: 12px 16px;
 | ||
|             }
 | ||
| 
 | ||
|             .detail-item {
 | ||
|                 flex-direction: column;
 | ||
|                 align-items: flex-start;
 | ||
|                 gap: 4px;
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         /* Demo Instructions */
 | ||
|         .demo-instructions {
 | ||
|             margin-top: 30px;
 | ||
|             padding: 20px;
 | ||
|             background: white;
 | ||
|             border: 1px dashed #ccc;
 | ||
|             color: #666;
 | ||
|             font-size: 14px;
 | ||
|             text-align: left;
 | ||
|         }
 | ||
| 
 | ||
|         .demo-instructions h3 {
 | ||
|             margin-bottom: 10px;
 | ||
|             color: #333;
 | ||
|         }
 | ||
| 
 | ||
|         .demo-instructions ul {
 | ||
|             margin-left: 20px;
 | ||
|         }
 | ||
|     </style>
 | ||
| </head>
 | ||
| <body>
 | ||
|     <div class="demo-container">
 | ||
|         <div class="demo-title">
 | ||
|             成长值详情模态框原型演示
 | ||
|         </div>
 | ||
|         
 | ||
|         <button class="trigger-button" onclick="openModal()">
 | ||
|             点击打开成长值详情模态框
 | ||
|         </button>
 | ||
| 
 | ||
|         <div class="demo-instructions">
 | ||
|             <h3>原型说明:</h3>
 | ||
|             <ul>
 | ||
|                 <li>线框图风格设计,使用虚线边框</li>
 | ||
|                 <li>点击按钮打开模态框</li>
 | ||
|                 <li>点击X或遮罩层关闭模态框</li>
 | ||
|                 <li>响应式布局,适配移动端</li>
 | ||
|                 <li>成长值增加显示为绿色</li>
 | ||
|                 <li>底部灰色背景区域显示描述信息</li>
 | ||
|             </ul>
 | ||
|         </div>
 | ||
|     </div>
 | ||
| 
 | ||
|     <!-- Modal -->
 | ||
|     <div class="modal-overlay" id="modalOverlay" onclick="closeModal(event)">
 | ||
|         <div class="modal-container" onclick="event.stopPropagation()">
 | ||
|             <div class="modal-header">
 | ||
|                 <div class="modal-title">成长值详情</div>
 | ||
|                 <button class="close-button" onclick="closeModal()">×</button>
 | ||
|             </div>
 | ||
|             
 | ||
|             <div class="modal-content">
 | ||
|                 <div class="detail-item">
 | ||
|                     <span class="detail-label">变化原因:</span>
 | ||
|                     <span class="detail-value">活动奖励</span>
 | ||
|                 </div>
 | ||
|                 
 | ||
|                 <div class="detail-item">
 | ||
|                     <span class="detail-label">变化时间:</span>
 | ||
|                     <span class="detail-value">2025-07-12 17:20</span>
 | ||
|                 </div>
 | ||
|                 
 | ||
|                 <div class="detail-item">
 | ||
|                     <span class="detail-label">成长值增加:</span>
 | ||
|                     <span class="detail-value positive">+100</span>
 | ||
|                 </div>
 | ||
|             </div>
 | ||
|             
 | ||
|             <div class="modal-footer">
 | ||
|                 <div class="footer-description">
 | ||
|                     参与平台活动获得的成长值奖励
 | ||
|                 </div>
 | ||
|             </div>
 | ||
|         </div>
 | ||
|     </div>
 | ||
| 
 | ||
|     <script>
 | ||
|         function openModal() {
 | ||
|             document.getElementById('modalOverlay').classList.add('show');
 | ||
|             document.body.style.overflow = 'hidden';
 | ||
|         }
 | ||
| 
 | ||
|         function closeModal(event) {
 | ||
|             if (event && event.target !== event.currentTarget) {
 | ||
|                 return;
 | ||
|             }
 | ||
|             document.getElementById('modalOverlay').classList.remove('show');
 | ||
|             document.body.style.overflow = 'auto';
 | ||
|         }
 | ||
| 
 | ||
|         // Close modal with Escape key
 | ||
|         document.addEventListener('keydown', function(event) {
 | ||
|             if (event.key === 'Escape') {
 | ||
|                 closeModal();
 | ||
|             }
 | ||
|         });
 | ||
|     </script>
 | ||
| </body>
 | ||
| </html> |