137 lines
2.0 KiB
CSS
137 lines
2.0 KiB
CSS
/* 二维码功能样式 */
|
|
|
|
/* 悬浮按钮 */
|
|
#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;
|
|
}
|