Fullcalendar使用CSS/JS固定周高

Fullcalendar使用CSS/JS固定周高,fullcalendar,Fullcalendar,示例如下: 我将日历作为边栏设置为宽度:260px,在fullcalendar中,将高度设置为480px以避免滚动。如何在不滚动的情况下使日历呈现方形?我只是想降低行高,但是 .fc-row .fc-week .fc-widget-content { height: 20px } 不起作用,我想这是因为日历高度是在运行时动态设置的。您能试试这个吗: eventAfterAllRender: function(){ $('.fc-week.fc-widget-content.fc-rigi

示例如下:

我将日历作为边栏设置为宽度:260px,在fullcalendar中,将高度设置为480px以避免滚动。如何在不滚动的情况下使日历呈现方形?我只是想降低行高,但是

.fc-row .fc-week .fc-widget-content { height: 20px }
不起作用,我想这是因为日历高度是在运行时动态设置的。

您能试试这个吗:

eventAfterAllRender: function(){
  $('.fc-week.fc-widget-content.fc-rigid').attr('style', 'min-height: 3em');
}
而不是:

eventAfterAllRender: function(){
  $('.fc-row').css('min-height','10px'); 
  $('.fc-week, .fc-widget-content, .fc-rigid').attr('style','height: 10px');
},

是的,刚刚试用过Chrome和Firefox:你能试试这个吗:。
eventAfterAllRender
可能触发得太早。