How do I load external fonts into an HTML document?

后端 未结 8 993
我在风中等你
我在风中等你 2020-12-04 15:41

How do I load external font files into an HTML document.

Example: Make the text \"blah blah blah blah blah blah blah\" a custom font from a TTF file in the same dir

8条回答
  •  -上瘾入骨i
    2020-12-04 16:01

    CSS3 offers a way to do it with the @font-face rule.

    http://www.w3.org/TR/css3-webfonts/#the-font-face-rule

    http://www.css3.info/preview/web-fonts-with-font-face/

    Here is a number of different ways which will work in browsers that don't support the @font-face rule.

提交回复
热议问题