2012-05-22 27 views
1

我尝试了一切,但无法工作。@ Font-Face Internet Explorer - Firefox相同的域名

这是我@字体面的代码部分:

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

它可以在Chrome和Safari,但没有在IE和Firefox的作​​品。字体和CSS是在同一个域,我总是使用相对路径。

回答

1

确保所有字体格式都包含在IIS服务器环境中。 IIS默认不包含.woff。确认EOT,TTF和SVG也在那里。

+0

我在HTTP头中添加了所有MIME类型是否正确?你可以更具体一点吗? – user1410089

+0

服务器是win 2003和IIS6 – user1410089

+0

Woff需要MIME类型'application/x-font-woff'。以下是包含一些说明的页面:http://www.projectseven.com/tutorials/servers/iis-woff/index.htm –