首頁  >  文章  >  web前端  >  CSS @font-face 規則的用法

CSS @font-face 規則的用法

王林
王林轉載
2023-08-31 08:45:05658瀏覽

CSS @font-face 规则的用法

@font-face規則用於詳細描述文件中使用的字型。 @font-face也可以用於定義字體的下載位置,儘管這可能會遇到特定實現的限制。

範例

<style>
   <!--
      @font-face {
         font-family: "Scarborough Light";
         src: url("http://www.font.site/s/scarbo-lt");
      }

      @font-face {
         font-family: Santiago;
         src: local ("Santiago"),
         url("http://www.font.site/s/santiago.tt")
         format("truetype");
         unicode-range: U+??,U+100-220;
         font-size: all;
         font-family: sans-serif;
      }
   -->
</style>
#

以上是CSS @font-face 規則的用法的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除