【问题标题】:Fullcalendar fix week height with CSS / JSFullcalendar 使用 CSS / JS 修复周高
【发布时间】:2017-01-30 13:52:53
【问题描述】:

这里的例子:

http://jsbin.com/lonopu/edit?html,css,js,output

我将日历作为侧边栏设置为宽度:260 像素,在全日历中将高度设置为 480 像素以避免滚动。如何在不滚动的情况下为日历提供更方形的外观?我只是想降低行高,但是

.fc-row .fc-week .fc-widget-content { height: 20px }

不起作用,我猜是因为日历高度是在运行时动态设置的。

【问题讨论】:

    标签: fullcalendar


    【解决方案1】:

    你可以试试这个:

    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 试过:JsBin
    • 你能试试这个吗:JsBineventAfterAllRender 可能触发得太早。
    猜你喜欢
    • 2010-12-20
    • 1970-01-01
    • 2014-12-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-07
    • 2022-07-21
    • 2015-03-22
    相关资源
    最近更新 更多