如何在 CSS 中定义字体下载位置

cssweb developmentfront end technology更新于 2025/2/22 17:48:17

@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>

相关文章


有用资源