【问题标题】:Complete sticky header on FullCalendar schedulerFullCalendar 调度程序上的完整粘性标题
【发布时间】:2021-02-04 18:40:08
【问题描述】:

Sticky Header on Fullcalendar scheduler 这里有一个类似的问题,但建议的答案不起作用。 FullCalendar 提供stickyHeaderDates (https://fullcalendar.io/docs/stickyHeaderDates) 在滚动时将日历顶部的日期标题固定到视口。我需要相同的日历工具栏。此功能已被提出 (https://github.com/fullcalendar/fullcalendar/issues/5357),但近期似乎不会实现。

我试着用 CSS 来做实验

.fc-toolbar.fc-header-toolbar {
    position: sticky;
    top: 200px;
    z-index: 10;
}

.fc-head-container.fc-widget-header {
    position: sticky;
    top: 308px;
    z-index: 10;
    background: red;
}
.fc-timeline .fc-body .fc-scroller {
    height: 400px  !important;
}

但这只会使日历的工具按钮变得粘滞,并使它们脱离图形上下文。有人可以让我走上正轨吗?我有一个用于测试的代码笔:https://codepen.io/craftydlx/pen/RwaqbvL

【问题讨论】:

    标签: css fullcalendar fullcalendar-scheduler


    【解决方案1】:

    如果你添加这个,它应该可以工作。

    .fc .fc-toolbar.fc-header-toolbar {
      margin-bottom: 1.5em;
      position: sticky;
      top: 0;
      background: #ffffff;
      z-index: 100;
    }
    
    .fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>* {
      top: 34px;
    }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-30
      • 1970-01-01
      • 2014-01-27
      • 1970-01-01
      • 2011-07-01
      相关资源
      最近更新 更多