fullCalendar Font size

孤人 提交于 2019-12-11 06:28:34

问题


I am having issues setting the calendar font sizes to be smaller.

I have changed setting a container div font size, no effect.

I have also changed the fullCalender.css font from 1em to 0.5em and to a px size but the calendar text stays the same.


回答1:


This is quite the blast from the past, but I originally found this looking for a solution.

I just wanted to change the font size of the elements in the table (date headers, time sidebar). The following worked for me:

th.ui-widget-header {
    font-size: 9pt;
    font-family: Verdana, Arial, Sans-Serif;
}

I used opera dragonfly to find the element class (CTRL+SHIFT+i -> Hover over element), but any DOM inspector should do.




回答2:


  1. Add the 'theme' setting in FullCalendar.

    $('#calendar').fullCalendar({
      theme: true
    });
    
  2. Add your Custom themed CSS by editing the FullCalendar provided CSS file, http://arshaw.com/js/fullcalendar-1.6.1/demos/cupertino/theme.css

Note: Demo is here http://arshaw.com/js/fullcalendar-1.6.1/demos/theme.html




回答3:


For future reference:

.fc-title{
    font-size: .9em;
}



回答4:


I could solve that problem with the following

::ng-deep body .fc {
  font-size: 12px;



回答5:


try and use !important which is a CSS rule to obey that rule and ignore others.

e.g: in CSS:

.calendar{font-size: 12px !important:}

in jQuery:

$('.calendar').css('font-size','12px !important');



回答6:


Change general font size (fullcalendar.css) except Modals , addevent and edit event

body .fc { 
   font-size: 1.5em;  <--- change here for general 
}



回答7:


I have found the cause, not sure why this is causing the issue but when I didn't declare the document type as

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

it wouldn't change the font size.

Thanks



来源:https://stackoverflow.com/questions/2565799/fullcalendar-font-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!