开发者

Verdana vs Arial - How can I set the font sizes in CSS?

I want to use the following font:

font-family: Verdana; font-size: 0.85em

However I'm concerned that it may not be available on all machines. So here's my substitute. The problem is that the two fonts are not the same size so I need to set like this:

fon开发者_JS百科t-family: arial; font-size: 1em

Which makes it a problem when setting

font-family: Verdana, Arial

Any suggestions on what I could do? Is Verdana now on almost all machines? Ideally I would like to specify in my body to use a Verdana at 0.85em or an Arial.


As Diodeus says, you're quite safe using these fonts, because they're widely available. But you could use the CSS 3 font-size-adjust property. It allows to apply a relative resizing factor when a fall-back font is used instead of the preferred one.

This property is not available in many browsers yet, but it is still a good idea to implement it. Support will may be better in the near future.


You're save with that. See: http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html


According to this survey:

http://www.codestyle.org/css/font-family/sampler-CombinedResultsFull.shtml

Verdana has a near 100% rate and would be safe to use.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜