2017-02-04 57 views
1

我用了一個網站的結構如下:FONT-FAMILY沒有在CSS工作雖然結構是確定

    • 主題
      • index.html
    • 資產
      • myfont
        • CSS
          fontiran.cssstyle.css
        • 字體
          IRANSansWeb.eotIRANSansWeb.woffIRANSansWeb.woff2,和IRANSansWeb.ttf

而且內容是:

的index.html:

[...] 
<link href="../assets/myfont/css/style.css" rel="stylesheet"> 
[...] 

的style.css:

@import url(fontiran.css); 
body { 
    font-family: IRANSans !important; 
} 

fontiran.css:

@font-face { 
    font-family: IRANSans; 
    font-style: normal; 
    font-weight: normal; 
    src: url('../fonts/IRANSansWeb.eot'); 
    src: url('../fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'), 
     url('../fonts/IRANSansWeb.woff2') format('woff2'), 
     url('../fonts/IRANSansWeb.woff') format('woff'), 
     url('../fonts/IRANSansWeb.ttf') format('truetype'); 
} 

但字體不工作在網站上。 FontFinder firefox插件顯示:

Font 
=============================== 
font-family (stack): IRANSans 
Font being rendered: System Default 
font-size: 13px 

但它沒有被使用。究竟是什麼問題?

回答