63 lines
1.1 KiB
CSS
63 lines
1.1 KiB
CSS
/* 打印时:隐藏所有内容 */
|
|
@media print {
|
|
body * {
|
|
visibility: hidden;
|
|
}
|
|
|
|
/* 只显示要打印的 div 及其子元素 */
|
|
#print-invoice,
|
|
#print-invoice * {
|
|
visibility: visible;
|
|
}
|
|
|
|
#print-invoice {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
padding: 1cm;
|
|
box-sizing: border-box;
|
|
font-size: 12pt;
|
|
font-family: 'SimSun', '宋体', serif;
|
|
}
|
|
|
|
/* 隐藏弹窗中的操作按钮(双重保险) */
|
|
.no-print {
|
|
display: none !important;
|
|
}
|
|
}
|
|
|
|
/* 屏幕上正常显示 */
|
|
@media screen {
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.modal-content {
|
|
background: white;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
width: 80%;
|
|
max-width: 600px;
|
|
}
|
|
|
|
.modal-actions {
|
|
margin-top: 20px;
|
|
text-align: right;
|
|
}
|
|
|
|
.modal-actions button {
|
|
margin-left: 10px;
|
|
padding: 8px 16px;
|
|
}
|
|
}
|