style: 优化打印样式,强制保留背景色并隐藏代码块操作按钮
continuous-integration/drone/push Build is passing

This commit is contained in:
seahi committed 2026-08-16 21:44:19 +08:00
1 parent be99e069df
commit 646fe61839
1 file changed
+9 -2
+9 -2
View File
@@ -1542,12 +1542,19 @@ footer section p:first-child {
/* 打印优化 */
@media print {
/* 隐藏目录、浮动按钮面板、页脚、顶栏导航 */
/* 强制浏览器打印背景颜色和图片(解决代码块和 admonition 没有背景色的问题) */
* {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
}
/* 隐藏目录、浮动按钮面板、页脚、顶栏导航、代码块操作按钮 */
.TOC,
#ctrler-panel,
footer,
header nav,
header .mobile-menu-btn {
header .mobile-menu-btn,
.code-header-actions {
display: none !important;
}
}