qrcode/style.css
2025-03-07 15:26:41 +08:00

163 lines
2.7 KiB
CSS

body {
background: #f5f5f5;
padding: 2em 0;
}
/* 布局 */
.ui.two.column.grid > .column {
display: flex;
}
.ui.fluid.card {
width: 100%;
margin: 0;
display: flex;
flex-direction: column;
}
.ui.card .content {
min-height: 400px;
display: flex;
padding: 1em !important;
flex-grow: 1;
}
/* 表单样式 */
.form-content {
display: flex;
flex-direction: column;
}
.ui.form {
display: flex;
flex-direction: column;
height: 100%;
}
.ui.form .field {
margin-bottom: 1em;
}
.ui.form textarea {
min-height: 80px;
resize: vertical;
white-space: pre-wrap;
word-wrap: break-word;
word-break: normal;
overflow-wrap: break-word;
line-height: 1.5;
}
#qrContent, #centerText {
font-family: "Helvetica Neue", Arial, sans-serif;
}
/* 按钮容器 */
.button-container {
margin-top: auto !important;
padding: 0 !important;
width: 100%;
}
/* 使用 Semantic UI 标准按钮组 */
.ui.fluid.buttons {
width: 100%;
margin: 0 !important;
}
.ui.fluid.buttons .button {
width: 50%;
}
#printBtn {
border: 1px solid #e0e1e2 !important;
background-color: #f8f9fa !important;
}
#printBtn:hover {
background-color: #e9ecef !important;
}
/* 预览区域 */
.preview-paper {
background-color: white;
width: 100%;
height: 0;
padding-bottom: 141.4%; /* A4 比例 */
position: relative;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
overflow: hidden;
}
.preview-content {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 5%;
}
#qrcode {
max-width: 100%;
max-height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: visible;
}
#qrcode canvas {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
/* 打印样式 */
#print-container {
display: none;
}
@media print {
@page {
size: A4 portrait;
margin: 0;
}
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #fff;
}
.ui.container, .ui.grid, .ui.basic.segment {
display: none !important;
}
#print-container {
display: block !important;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9999;
background: white;
}
#print-container canvas {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
max-width: 90%;
max-height: 90%;
height: auto !important;
}
}