目录

font-family

描述 (Description)

font-family属性允许作者提供逗号分隔的特定字体系列列表,以及用于渲染元素文本的通用类型的字体系列。

可能的值 (Possible Values)

  • font-family - 以逗号分隔的字体系列列表。

适用于 (Applies to)

所有HTML元素。

DOM语法 (DOM Syntax)

object.style.fontFamily = "georgia,garamond,serif";

例子 (Example)

以下是使用此属性的示例 -

<html>
   <head>
   </head>
   <body>
      <p <b class="notranslate">style = "font-family:georgia,garamond,serif;"</b>>
         This text is rendered in either georgia, garamond, or the 
         default serif font depending on which font  you have at your system.
      </p>
   </body>
</html>

这将产生以下结果 -

新页面打开
↑回到顶部↑
WIKI教程 @2018