FullCalendar v5:如何使内容宽度适合屏幕



我目前正在构建一个日历和时间轴视图与fullcalendar v5。我的客户希望有一个月的视图,他们可以忽略整个月一次,没有滚动条。我知道你可以设置contenttheight为auto,但是没有宽度选项。我的插槽持续时间是1天。这是没有商量余地的。

我想这样做响应,而不是硬编码列宽度在像素。有人有什么建议吗?

您可以尝试将width作为以下值之一:

width: fit-content;/*Will give width upto the content of calender can fit completely*/
width: max-content;/*Will give width upto the max-content of calender*/
width: 100%;/*Will give the full container width to calender*/
width: 100vw;/*Will give the full view-port width to the calender*/

使用这个,这样填充不会产生额外的空间并导致溢出:

*{
box-sizing: border-box;
}

相关内容

最新更新