简体   繁体   English

CSS导入字体问题

[英]CSS Import Font Issue

I am trying to import a font from a web-kit. 我正在尝试从Web工具包导入字体。 The code is in place and the fonts are uploaded to server but won't show on site. 代码已经到位,字体已上传到服务器,但不会在网站上显示。

CSS 的CSS

@font-face {
        font-family: 'gauntlet_thinregular';
        src: url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.eot');
        src: url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.eot?#iefix') format('embedded-opentype'),
             url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.woff2') format('woff2'),
             url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.woff') format('woff'),
             url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.ttf') format('truetype'),
             url('http://dharmafund.net/fonts/gauntletthin_tb-webfont.svg#gauntlet_thinregular') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    h1, h2, h3, h4, h5, h6 {
       font-family: 'gauntlet_thinregular'!important; 
    }

I tried this code on a Wordpress install and it worked but it's not working on this other platform I'm using (CrowdfundHQ). 我在Wordpress安装上尝试了此代码,它可以工作,但在我正在使用的其他平台(CrowdfundHQ)上却无法工作。 Any thoughts? 有什么想法吗?

Website URL: http://dharma-fund.crowdfundhq.com 网站网址: http : //dharma-fund.crowdfundhq.com

Thanks 谢谢

The fonts are now loading afer adding the following code to .htaccess 现在,在将以下代码添加到.htaccess中后,将加载字体

<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM