You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何修改Thunderbird日历周视图与单日视图的日期背景色?

修改Thunderbird周视图/单日视图指定日期背景色

Thunderbird不同日历视图的DOM结构差异较大,月/多周视图的选择器无法直接复用在周视图或单日视图上,以下是对应场景的CSS代码:

周视图指定日期背景修改

周视图中目标日期的容器类为.calendar-week-day-box,结合日期属性即可定位:

/* 周视图:2023年12月25日背景色改为周末样式 */
.calendar-week-day-box[year="2023"][month="12"][day="25"] {
  background-color: var(--viewWeekendBackground) !important;
}

若仅需修改日期内容区域的背景,可替换选择器为:

.calendar-week-day-box[year="2023"][month="12"][day="25"] .calendar-week-day-box-content {
  background-color: var(--viewWeekendBackground) !important;
}

单日视图指定日期背景修改

单日视图的日期容器类为.calendar-day-box,使用如下代码:

/* 单日视图:2023年12月25日背景色改为周末样式 */
.calendar-day-box[year="2023"][month="12"][day="25"] {
  background-color: var(--viewWeekendBackground) !important;
}

注意事项

  • 替换代码中的year、month、day参数为目标日期的数值
  • 可将var(--viewWeekendBackground)替换为具体颜色值(如#f0f8ff)自定义背景色
  • 确保Thunderbird已开启自定义CSS支持:在about:config中将toolkit.legacyUserProfileCustomizations.stylesheets设为true,并将代码放入用户文件夹下的chrome/userChrome.css文件中

内容的提问来源于stack exchange,提问作者maf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.21 14:35:06