簡體   English   中英

CSS @ font-face無法呈現

[英]CSS @font-face doesn't render

我在網站的樣式表中使用以下代碼,但是當我在瀏覽器中運行它時,它將不會呈現,字體也不會呈現。 我究竟做錯了什么?

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

檢查您的網絡面板,以確定是否真正加載了字體:

在此處輸入圖片說明

如果是,請確保您在CSS中正確引用了它們,例如:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM