小编Fit*_*mx6的帖子

@ font-face找不到文件夹中的字体

我想让@ font-face在位于public_html/evansopen文件夹中的子域中工作.我有网站http://coryfitzpatrick.com/evansopen/正在运行.我想将fontsquirrel文件放在evansopen/fonts中,但是当我没有它们与styles.css和index.php(public_html/evansopen文件夹)相同的位置时它们不会加载.它目前运行良好,但我喜欢保持我的文件结构清洁.

我可以从/evansopen/images/putting_green_footer.gif文件夹中加载图像,没有这样的问题

#footer {
    background-image: url(images/putting_green_footer.gif); background-repeat: repeat;
}
Run Code Online (Sandbox Code Playgroud)

为什么我不能让@ font-face直接指向evansopen/fonts /?

@font-face {
    font-family: 'nexa_lightregular';
        src: url('fonts/nexa_light-webfont.eot');
        src: url('fonts/nexa_light-webfont.eot?#iefix') format('embedded-opentype'), 
             url('fonts/nexa_light-webfont.woff') format('woff'),
             url('fonts/nexa_light-webfont.ttf') format('truetype'),
             url('fonts/nexa_light-webfont.svg#nexa_lightregular') format('svg');
    font-weight: normal;
    font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)

我对此进行了相当多的研究.对不起,如果这是一个多余的帖子.

css webfonts font-face

4
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×1

font-face ×1

webfonts ×1