Fullcalendar - 无法更改日历的背景颜色
Fullcalendar - can't change background color of calendar
我尝试更改全日历的背景颜色。
我尝试了这些方法(没有成功):
td .fc-unthemed td.fc-today {
background: red !important;
}
.fc-unthemed td.fc-today > tr > td{
background: blue !important;
}
.fc-unthemed td.fc-today td{
background: black !important;
}
.fc-unthemed td.fc-today {
background: green !important;
background: linear-gradient(90deg, rgba(204, 204, 204, 1) 0%, rgba(255, 255, 255, 1) 100%);
}
.fc td {
background-color: #333 !important;
}
.fc th {
background-color: #333 !important;
}
我的依赖项:
"@angular/core": "~9.0.5", "@fullcalendar/angular": "^4.4.5-beta", "@fullcalendar/core": "^4.4.0",
更新:
我尝试将 class 添加到 fullCalendar(但没有成功)
<full-calendar
#specCalendar
...
[className]="'spectator-calendar'"
>
您需要尝试 css 总体更改 style.css。你不能改变它,如果你写在 component.css.
如果您的日历上还有更多内容,请将 class 添加到您的日历中
添加 class <full-calendar class="testClass "
将这些代码写入您的 style.css
.testClass .fc-view-container {
background: #ffffff57 !important
}
.testClass .fc-unthemed th, .fc-unthemed td, .fc-unthemed thead, .fc-unthemed tbody, .fc-unthemed .fc-divider, .fc-unthemed .fc-row, .fc-unthemed .fc-content, .fc-unthemed .fc-popover, .fc-unthemed .fc-list-view, .fc-unthemed .fc-list-heading td {
border-color: #949494;
}
.testClass .fc-time-grid .fc-slats {
background:#333 !important;
color:white;
}
我尝试更改全日历的背景颜色。
我尝试了这些方法(没有成功):
td .fc-unthemed td.fc-today {
background: red !important;
}
.fc-unthemed td.fc-today > tr > td{
background: blue !important;
}
.fc-unthemed td.fc-today td{
background: black !important;
}
.fc-unthemed td.fc-today {
background: green !important;
background: linear-gradient(90deg, rgba(204, 204, 204, 1) 0%, rgba(255, 255, 255, 1) 100%);
}
.fc td {
background-color: #333 !important;
}
.fc th {
background-color: #333 !important;
}
我的依赖项: "@angular/core": "~9.0.5", "@fullcalendar/angular": "^4.4.5-beta", "@fullcalendar/core": "^4.4.0",
更新: 我尝试将 class 添加到 fullCalendar(但没有成功)
<full-calendar
#specCalendar
...
[className]="'spectator-calendar'"
>
您需要尝试 css 总体更改 style.css。你不能改变它,如果你写在 component.css.
如果您的日历上还有更多内容,请将 class 添加到您的日历中
添加 class <full-calendar class="testClass "
将这些代码写入您的 style.css
.testClass .fc-view-container {
background: #ffffff57 !important
}
.testClass .fc-unthemed th, .fc-unthemed td, .fc-unthemed thead, .fc-unthemed tbody, .fc-unthemed .fc-divider, .fc-unthemed .fc-row, .fc-unthemed .fc-content, .fc-unthemed .fc-popover, .fc-unthemed .fc-list-view, .fc-unthemed .fc-list-heading td {
border-color: #949494;
}
.testClass .fc-time-grid .fc-slats {
background:#333 !important;
color:white;
}