完整日历样式重置
问题描述:
我们正在尝试将完整日历整合到WordPress网站的前端。我们面临的问题是,大多数WordPress主题都具有改变表格外观的自定义样式,从而使“完整日历”看起来破碎。完整日历样式重置
我不是CSS专家,所以任何帮助,非常感谢。是否有任何方法重置样式,以便完全日历自己的样式始终应用于相同的样式集,而不管页面上可能加载的任何其他样式是什么?
谢谢:)
答
也许你可以尝试删除他们的CSS,并在那里添加你的CSS类。
这对我的作品(版本v1.5.4),
$('#calendar').fullCalendar({
...
,eventRender: function(event, element) { //render how event look like
// example add element
element.attr("category",event.title);
//example to remove the original color
//element.find("div").removeClass("fc-event-skin fc-event-inner");
//OR
//element.find("div").css({"background-color":"transparent","border-color":"transparent"});
//element.css({"background-color":event.colors,"border-color":"transparent"});
//example to add class
if(event.title === "big_event"){
element.addClass("calred");
}
},
viewDisplay : function(view) { //render how calendar look like
//example coloring on sat,sun
$(".fc-sat, .fc-sun").addClass("ss-holiday");
$("th.fc-sat, th.fc-sun").removeClass("ss-holiday");
}
...
});