开发者

What does having more than 1 font in CSS mean?

font:0.5e开发者_高级运维m Georgia,"Times New Roman",Sans-Serif;

What does this mean when someone sets 3 different fonts? Also what is the em mean?

Update: Does the double quotations around Times New Roman mean it is telling CSS to use this first?


Multiple fonts indicate an order of preference in fonts to use. In this case, Georgia is the preferred font; if that's not available, use Times New Roman, and finally fall back to Sans-Serif.

em is a relative measure of font size, so in this case it means use half of the "normal" font size.


Failover. If you dont have the first one, it tries the second, and so on.


Yes. The first installed font is used, so, in your case, the font Georgia is used if installed. If not, Times New Roman is used. If neither of these are installed, then any Sans-Serif font will be used. (Yes, Sans-Serif is not the name of a particular font, but a name for a family of similar fonts, without so-called serifs.)

When it comes to the unit "em", please see W3C Schools.


Alternatives in case of a font isn't installed on the system (if there's no Georgia, go for Times New Roman, ..).

Em is a CSS size unit (http://www.w3schools.com/css/css_units.asp). It's equal to the text size (i.E. browser default, depends on context of course).


If a font name contains white-space, it should be quoted. Single quotes must be used when using the inline "style" attribute in HTML

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜