CSS @ font-face不呈现

时间:2013-04-08 00:54:46

标签: html css font-face

我在我的网站的样式表中使用以下代码,但是当我在浏览器中运行它时,它不会呈现,字体不会呈现。我做错了什么?

@font-face {  
  font-family: 'Libel Suit';  
  src: url('my.ip.n.n/~/wordpress/fonts/libelsuit.woff') format('woff'),  
       url('my.ip.n.n/~/wordpress/fonts/libelsuit.ttf') format('truetype');  
       // These aren't the exact URLS I'm using, since I don't want the  
       // world to know my ip address
}

1 个答案:

答案 0 :(得分:0)

检查network panel以确定字体是否实际加载:

enter image description here

如果是,请确保您在css中正确引用它们,例如:

h1 {
  font-family: 'Libel Suit'; 
}