CSS字体链接

Jor*_*rge 0 css font-face

我在闲逛如何将css中的font -family链接到文件夹中的字体.与PHP一样,您可以在文件夹中使用您的字体.
示例代码:

CSS:

font-family: verdana;

This is what I mean:

font-family: foldername/font

那有代码吗?或者我必须使用PHP来浏览我自己的字体?

eug*_*neK 5

@font-face {
  font-family: "Kimberley";
  src: url(http://www.princexml.com/fonts/larabie/kimberle.ttf) format("truetype");
}
Run Code Online (Sandbox Code Playgroud)

刚刚在"A List Apart"上找到这个,没有检查过我自己,但这个网友是网上设计师最尊重的资源之一,所以我想你最好的镜头就是尝试一下.

  • 这将无法在Internet Explorer中描述:您需要一种不同的字体格式.本文提供了良好的背景信息:http://randsco.com/index.php/2009/07/04/p680 (2认同)