CSS-web字体


  1. 字体通常不是免费使用的。
  2. All major browsers support WOFF/WOFF2 (Web Open Font Format versions 1 and 2). Even older browsers such as IE9 (released in 2011) support the WOFF format.
  3. WOFF2 supports the entirety of the TrueType and OpenType specifications, including variable fonts, chromatic fonts, and font collections.
  4. The order in which you list font files is important. If you provide the browser with a list of multiple font files to download, the browser will choose the first font file it’s able to use. That's why the format you list first should be the best, preferred format — that is, WOFF2 — with the older formats listed after that. Browsers that don't understand one format will then fall back to the next format in the list.
  5. If you need to work with legacy browsers, you should provide EOT (Embedded Open Type), TTF (TrueType Font), and SVG web fonts for download. This article explains how to use the Fontsquirrel Webfont Generator to generate the required files.


@font-face {
    font-family: 'zantrokeregular';
    src: url('fonts/zantroke-webfont.woff2') format('woff2'),
         url('fonts/zantroke-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}
Copy to Clipboard
font-family: 'zantrokeregular', serif;
阅读量: 537
发布于:
修改于: