【问题标题】:Full calendar - Style cell date of day完整日历 - 样式单元格日期
【发布时间】:2016-03-05 06:30:57
【问题描述】:

我用插件全日历做了一个日历。我想改变今天日期的样式。

.fc-unthemed .fc-today {
    color: #fff !important;
    background-color: red;
}

但单元格的背景颜色,必须像下一张图片。

怎么可能呢?谢谢

【问题讨论】:

    标签: fullcalendar


    【解决方案1】:

    您可以应用 CSS 来创建像三角形一样的边框,并将其显示在右上角。

    .fc-day.fc-today {
        position: relative;
    }
    
    .fc-day.fc-today::before,
    .fc-day.fc-today::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        border-color: transparent;
        border-style: solid;
    }   
    
    .fc-day.fc-today::before {
        border-width: 1.5em;
    }
    
    .fc-day.fc-today::after {
        border-radius: 0;
        border-width: 1.5em;
        border-right-color: red;
        border-top-color: red;
    }
    

    输出将如下所示。

    【讨论】:

    • 还有一件事,改变今天的颜色?
    • 只覆盖这个类 fc-state-highlight
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-31
    • 2019-02-16
    • 2016-03-15
    • 1970-01-01
    • 2014-03-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多