如何在 CSS 中為下載的字型定義位置


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

更新日期: 2020 年 6 月 27 日

79 次瀏覽

開啟你的職業生涯

透過完成課程獲得認證

入門
廣告
© . All rights reserved.