From 646fe6183973072cdf8e753286a152b5a60d53b2 Mon Sep 17 00:00:00 2001 From: seaHi Date: Sun, 16 Aug 2026 21:44:19 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BC=98=E5=8C=96=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=EF=BC=8C=E5=BC=BA=E5=88=B6=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E8=89=B2=E5=B9=B6=E9=9A=90=E8=97=8F=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=9D=97=E6=93=8D=E4=BD=9C=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.css | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app.css b/src/app.css index 83c122b..977adaa 100644 --- a/src/app.css +++ b/src/app.css @@ -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; } }