Css-font-family

提供:Dev Guides
移動先:案内検索

CSS-フォントファミリー

説明

_font-family_プロパティを使用すると、作成者は、要素のテキストのレンダリングに使用される特定のフォントファミリのコンマ区切りリストと、一般的なフォントファミリを提供できます。

可能な値

  • font-family -フォントファミリーのコンマ区切りリスト。

に適用されます

すべてのHTML要素。

DOM構文

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

このプロパティを使用した例は次のとおりです-

<html>
   <head>
   </head>

   <body>
      <p style = "font-family:georgia,garamond,serif;">
         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>

これにより、次の結果が生成されます–