使用FullCalendar如何调整fc-event div的高度?

时间:2011-11-03 04:34:37

标签: fullcalendar

我正在使用FullCalendar显示一些事件,但它会在周和日模式下剪切事件的名称。

看来fullcalendar正在将fc-event div的高度设置为12px,但我需要它为20px:

<div class="fc-event fc-event-skin fc-event-vert fc-corner-top fc-corner-bottom" 
style="position: absolute; z-index: 8; top: 314px; left: 441px; 
background-color: green; color: white; 
width: 112.94999999999999px; height: 12px;  ">

是否可以设置fc-event div的高度?

6 个答案:

答案 0 :(得分:5)

e.g。

  

.fc-event {height:2em; }

答案 1 :(得分:5)

我只是想通了。只需将重要规则放在fullcalendar.css

  

身高:50px!important;

干杯!

答案 2 :(得分:1)

如果你进入fullcalendar.css并改变高度,它可能会有效。

答案 3 :(得分:1)

我的解决方案更多的是解决问题,而不是实际的解决方案。 设置事件时,在title属性中添加\ r \ n以将其分开一点。

我花了一些时间浏览js文件来尝试调整高度的计算方式,但由于视图的切换,它有点乱。

这会增加事件的高度而不会弄乱定位/ css。

答案 4 :(得分:0)

试试这个

.fc-time-grid .fc-slats td {
        height: 20px !important;
}

答案 5 :(得分:-1)

在fullcalendar.min.js中

defaultTimedEventDuration: "00:15:00"更改为您需要的任何时间。