1 回答

TA贡献1784条经验 获得超8个赞
试试这些 CSS 规则。他们以你的例子为我工作。
#calendar
的最大宽度为900px
,因此将其重置为100%
..fc-scroller.fc-day-grid-container
宽度设置为 649px,因此请覆盖它。.fc-day-grid.fc-unselectable
需要设置高度才能延伸到页面.fc-basic-view .fc-body .fc-row
有一些明确设置的高度。日历可能总是有 6 行,所以这就是我将它分成 6 的原因。如果只有五行,您可能需要使用 JS 向该表添加一个类来指定这些行的高度。
// controls width
#calendar {
width: 100%;
max-width: 100%;
}
// controls height
.fc-scroller.fc-day-grid-container {
height: 89vh!important; // tweak this value to suit your needs
overflow: hidden; // optional
}
.fc-scroller > .fc-day-grid, .fc-scroller > .fc-time-grid {
height: 100vh!important;
}
.fc-day-grid.fc-unselectable {
height: 100%!important;
// controls the height of each row
.fc-basic-view .fc-body .fc-row {
min-height: 4em;
height: calc(100% / 6) !important;
}
添加回答
举报