.button-hover-card-wrapper { display: inline-block; position: relative; } /* 悬浮卡片 */ .hover-info-card { position: fixed; z-index: 10000; transform: translateY(-50%); opacity: 0; animation: slideInRight 0.3s ease forwards; pointer-events: none; } .hover-info-card-visible { opacity: 1; } @keyframes slideInRight { from { opacity: 0; transform: translateY(-50%) translateX(-20px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } } .hover-info-card-content { width: 340px; background: white; border-radius: 12px; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.08), 0 0 2px rgba(0, 0, 0, 0.04); overflow: hidden; } .hover-info-card-content .ant-card-body { padding: 16px; } /* 卡片头部 */ .hover-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; } .hover-card-title-wrapper { display: flex; align-items: center; gap: 8px; flex: 1; } .hover-card-icon { font-size: 20px; color: #1677ff; } .hover-card-title { margin: 0; font-size: 16px; font-weight: 600; color: rgba(0, 0, 0, 0.88); } .hover-card-badge { margin: 0; font-size: 11px; padding: 2px 8px; border-radius: 10px; } /* 卡片描述 */ .hover-card-description { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(0, 0, 0, 0.65); } /* 卡片区块 */ .hover-card-section { margin-top: 12px; padding: 10px; background: #f8f9fa; border-radius: 8px; border-left: 3px solid #1677ff; } .hover-card-warning { background: #fff7e6; border-left-color: #faad14; } .hover-card-section-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(0, 0, 0, 0.88); margin-bottom: 8px; } .section-icon { font-size: 12px; color: #1677ff; } .hover-card-warning .section-icon { color: #faad14; } .hover-card-list { margin: 0; padding-left: 16px; list-style-type: disc; } .hover-card-list li { font-size: 12px; line-height: 1.6; color: rgba(0, 0, 0, 0.65); margin-bottom: 4px; } .hover-card-list li:last-child { margin-bottom: 0; } /* 卡片底部 */ .hover-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f0f0f0; } .footer-label { font-size: 12px; color: rgba(0, 0, 0, 0.45); } .footer-kbd { display: inline-block; padding: 4px 10px; background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%); border: 1px solid #d9d9d9; border-radius: 6px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.05); font-size: 11px; font-family: 'Monaco', 'Consolas', monospace; color: rgba(0, 0, 0, 0.88); font-weight: 500; } /* 响应式调整 */ @media (max-width: 768px) { .hover-info-card-content { width: 280px; } .hover-info-card { left: 50% !important; transform: translateX(-50%) translateY(-50%); } @keyframes slideInRight { from { opacity: 0; transform: translateX(-50%) translateY(-50%) scale(0.95); } to { opacity: 1; transform: translateX(-50%) translateY(-50%) scale(1); } } }