/* 二维码功能样式 */ /* ========== 悬浮按钮 ========== */ #qr-btn { position: fixed; bottom: 100px; left: 20px; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: #4a90e2; color: #fff; border: none; font-size: 12px; font-weight: bold; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.3); z-index: 1000; display: none; white-space: nowrap; } #qr-btn.show { display: block; } #qr-btn:hover { background: #3a7bc8; } /* ========== 弹窗 ========== */ #qr-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 10000; justify-content: center; align-items: center; } #qr-modal.active { display: flex; } .qr-box { background: #fff; border-radius: 8px; width: 320px; max-width: 90%; } .qr-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #eee; } .qr-header h3 { margin: 0; font-size: 16px; } .qr-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; } .qr-body { padding: 20px; } #qr-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; box-sizing: border-box; } #qr-preview { margin-top: 15px; min-height: 128px; display: flex; justify-content: center; align-items: center; background: #f5f5f5; border-radius: 4px; } #qr-preview canvas { display: block; } .qr-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid #eee; } .qr-btn { padding: 8px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; } .qr-cancel { background: #f0f0f0; color: #333; } .qr-ok { background: #4a90e2; color: #fff; } /* ========== 画布上的二维码 ========== */ .qr-item { position: absolute; cursor: move; user-select: none; touch-action: none; } /* 选中状态 */ .qr-item.qr-selected { outline: 2px solid #4a90e2; outline-offset: 2px; } /* 删除按钮 */ .qr-delete-btn { position: absolute; top: -10px; right: -10px; width: 20px; height: 20px; background: #ff4444; color: #fff; border: none; border-radius: 50%; font-size: 16px; line-height: 20px; cursor: pointer; display: none; align-items: center; justify-content: center; z-index: 100; padding: 0; margin: 0; } .qr-item.qr-selected .qr-delete-btn { display: flex; } .qr-delete-btn:hover { background: #cc0000; } /* ========== 二维码工具栏 - 与背景图工具栏保持一致 ========== */ .qr-tools { display: none; } .qr-tools.active { display: flex; } /* 数值显示固定宽度,单独占位 */ #qrOpacityValue, #qrScaleValue { display: inline-block; min-width: 40px; text-align: center; }