fullcalendar backgroundColor属性

fullcalendar backgroundColor属性,fullcalendar,Fullcalendar,我正试图为一个活动添加背景色,但运气不好 $('#calendar').fullCalendar('renderEvent', { id: 1, title: 'hello', start: selected_date, allDay: true, color: '#FF0000', backgroundColor: '#000000' }, false); 你知道为什么这行不通吗?边框颜色似乎有效,但背景颜色无效试试这可能对你有用 background: '#eeeef0 不要编写b

我正试图为一个活动添加背景色,但运气不好

$('#calendar').fullCalendar('renderEvent', { id: 1, title: 'hello', start: selected_date, allDay: true, color: '#FF0000', backgroundColor: '#000000' }, false);

你知道为什么这行不通吗?边框颜色似乎有效,但背景颜色无效

试试这可能对你有用

 background: '#eeeef0  

不要编写backgroundColor。

如果同时添加两个样式表,则backgroundColor将不起作用

<link rel="Stylesheet" type="text/css" href="/Content/fullcalendar/fullcalendar.css" />
<link rel="Stylesheet" type="text/css" href="/Content/fullcalendar/fullcalendar.print.css")" />


事件的背景色在节下的fullcalendar.css文件中定义

/* Global Event Styles 
(第261行,版本2.0 beta)

您可以通过以下方式以编程方式访问它:

$('.fc-event').css('background-color','#3a87ad');   
尝试使其保持不变(最后将false参数更改为true),可能是新事件重叠并使其更改属性。
“通常,一旦日历重新提取其事件源(例如:单击“上一页”/“下一页”)时,事件将消失。但是,将“坚持”指定为true将导致事件永久固定到日历上。”,从文档中,添加“媒体”属性

    <link href="../css/fullcalendar/fullcalendar.css" rel="stylesheet" type="text/css" />
    <link media='print' href="../css/fullcalendar/fullcalendar.print.css" rel="stylesheet" type="text/css"  />


我在asp中的捆绑包配置中设置了它,但没有添加媒体属性,因此这是一个问题。

我是这样做的:我在图表事件中放置了backgroundColor:

chart: { 
    type: 'column',
    backgroundColor: 'transparent'
},

请参见文档中的事件对象属性[classname]。尝试过,但类名没有成功,背景不想更改颜色仍然没有成功,文档中说使用backgroundColor,因此背景不应该也不好用!我永远也想不到。非常感谢。