html – Font-Family属性中的多种字体?

前端之家收集整理的这篇文章主要介绍了html – Font-Family属性中的多种字体?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在命令中
<span style="font-family: arial,helvetica,sans-serif">
   <font size="1">
       [Country]
   </font>
</span>

为什么在font-family属性中有多种字体?

这是否意味着如果没有安装arial字体,那么它会转到helvetica?

解决方法

是.

The font-family property can hold several font names as a “fallback” system. If the browser does not support the first font,it tries the next font.

来自:http://www.w3schools.com/cssref/pr_font_font-family.asp

和好的做法:

Start with the font you want,and always end with a generic family,to let the browser pick a similar font in the generic family,if no other fonts are available.

猜你在找的HTML相关文章