@ font-face显示字体但不显示另一种字体

时间:2013-07-09 10:49:46

标签: css path font-face

我有一个简单的单页面布局,基本上都是HTML + CSS(很快会添加一些js,但目前还不存在)。

Baiscally我有这个:

/* Cambo */

    @font-face {
    font-family: 'CamboRegular';
    src: url('font/cambo/Cambo-Regular-webfont.eot');
    src: url('font/cambo/Cambo-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('font/cambo/Cambo-Regular-webfont.woff') format('woff'),
         url('font/cambo/Cambo-Regular-webfont.ttf') format('truetype'),
         url('font/cambo/Cambo-Regular-webfont.svg#CamboRegular') format('svg');
    font-weight: normal;
    font-style: normal; }

/* Source Sans Pro */

    @font-face {
    font-family: 'SourceSansProRegular';
    src: url('font/sourcesanspro/SourceSansPro-Regular-webfont.eot');
    src: url('font/sourcesanspro/SourceSansPro-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('font/sourcesanspro/SourceSansPro-Regular-webfont.woff') format('woff'),
         url('font/sourcesanspro/SourceSansPro-Regular-webfont.ttf') format('truetype'),
         url('font/sourcesanspro/SourceSansPro-Regular-webfont.svg#SourceSansProRegular') format('svg');
    font-weight: normal;
    font-style: normal; }

当我使用font-family时:'Cambo Regular'; 它的工作原理,但是当我尝试选择一个font-family时:'SourceSansProRegular';我尝试在任何浏览器上未加载字体

网站文件夹中字体的原始路径是url('../ assets / fonts / - >其余从FontSquirrel复制

因为我注意到两个都没有工作,所以我把它们移到css所在的文件夹中,所以我有

主文件夹(索引指向css文件夹)/ assets / css(带我的css)/ font(里面有两个字体文件夹)

为什么这不起作用?我在宣布路径时错过了什么?如果CamboRegular不能正常工作,但它在任何浏览器上都可以在Windows和Mac上正常显示。

快速编辑!

我将路径更改为完全错误的路径,并显示基本页面字体。 我认为字体正在加载但它看起来比它应该更“大胆”。如果你在Photoshop中观看设计,然后在页面上看起来不同(我设计了所以我知道它没有被拉伸或者其他东西)但是CamboRegular仍然在寻找并按照它应该做的。

以下是显示问题的图片

http://img526.imageshack.us/img526/2671/nnqu.jpg

包含灰色文本的

的CSS非常简单

p {
    color: #8a8a8a;
    font-family: 'SourceSansProRegular';
    font-size: 16px; }

这是顶级菜单的一个(图中未显示),CamboRegular正常工作

h1 { 
color: #494949;
font-family: 'CamboRegular';
font-size: 48px;
text-align: center; }

正如你所看到的那样,没什么特别的,但是,一个人在另一个人的工作不是。

0 个答案:

没有答案