跳到正文

个人记录

Luogu display better CSS

zhanjinghan约 4 分钟
原文

这是 2026年10月17日 存档的第 2 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2026年10月16日
收录
2026年10月16日
更新
2026年11月11日
篇幅
约 4 分钟

版本

  1. v3当前
  2. v2
  3. v1

/* 隐藏首页轮播图 */ #lg-slider { display: none !important; }

/* 给页面所有元素加白色描边 */ html body * { text-shadow: 0.5px 0.5px 0 #fff, -0.5px 0.5px 0 #fff, 0.5px -0.5px 0 #fff, -0.5px -0.5px 0 #fff, 0 0 4px rgba(255, 255, 255, 0.9) !important; }

/* 排除按钮、输入框、下拉框 */ html body button, html body button *, html body input, html body input *, html body textarea, html body textarea *, html body select, html body select * { text-shadow: none !important; }

/* 排除题目标签、徽章 */ html body .tag, html body .tag *, html body .lg-tag, html body .lg-tag *, html body .badge, html body .badge * { text-shadow: none !important; }

/* 排除难度标签 */ html body .difficulty, html body .difficulty * { text-shadow: none !important; }

/* 排除测评记录(AC / 时间内存 / 测试点) */ html body .status, html body .status *, html body .test-case, html body .test-case *, html body .lcolor-bg-green-3, html body .lcolor-bg-green-3 * { text-shadow: none !important; }

/* 排除弹出提示层(v-popper) */ html body .v-popper__wrapper, html body .v-popper__wrapper *, html body .v-popper__inner, html body .v-popper__inner * { text-shadow: none !important; }

/* 排除 am-badge 徽章(Rated / 官方比赛 / IOI 等) */ html body .am-badge, html body .am-badge * { text-shadow: none !important; }

/* 排除洛谷按钮(l-button,如“查看文章”) */ html body .l-button, html body .l-button * { text-shadow: none !important; }

/* 排除内联样式为白色文字的元素(如算法标签“双连通分量”) / html body [style=“color: rgb(255, 255, 255)”], html body [style*=“color: rgb(255, 255, 255)”] , html body [style=“color: #fff”], html body [style*=“color: #fff”] , html body [style=“color: white”], html body [style*=“color: white”] * { text-shadow: none !important; }

/* 排除代码块的行号 */ html body .line-numbers-rows, html body .line-numbers-rows *, html body .line-numbers-sizer, html body .line-numbers-sizer * { text-shadow: none !important; }