Weird bug with Trebuchet MS font

岁酱吖の 提交于 2019-12-11 10:39:44

问题


I'm trying to use the jquery.fullcalendar plugin using the jQuery UI theming.

Everything is ok, except that when the user try to select a time range (week or day view) the selection is displaced about one hour. You can see this behaivour in this fiddle.

I've reduced the problem and I arrived to the conclusion that the problem comes from the CSS code. In the fiddle I've copied the problematic CSS code (corresponds to the jQuery UI CSS framework). If you remove this CSS code, the selection works fine (but without format, of course).

I've been trying to find which is the exact problem, but I cannot see.

EDIT: I've reduced the problem to this. Now if you remove "Trebuchet MS" font from .ui-widget fullCalendar works!! See here working demo. The question now is, Why? I'm using Linux, I don't know if that has some effect...


回答1:


remove from your css the following:

.fc-agenda-slots td div {
    height:20px;
}

or change it to:

.fc-agenda-slots td div {
    height:auto;
}

I guess that the font size overflow the div of fixed 20px with result to get this "weird bug".

Demo: http://jsfiddle.net/gQMvH/5/




回答2:


I found the offending code. It's

.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; }

under Component containers. Particularly the font-family declaration. Removing it stops the odd behavior, but as to why it's causing it... no clue.

http://jsfiddle.net/5tAaj/



来源:https://stackoverflow.com/questions/7827015/weird-bug-with-trebuchet-ms-font

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