我正在准备一个简单的网站。但是我的字体在 Google Chrome 上不起作用。
这是我的页面
我的 CSS 代码:
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300,600);
body {
font-family: 'Open Sans', sans-serif;
font-size: 14px;
}
我的 web.config 数据
<system.webServer>
...
<staticContent>
<remove fileExtension=".svg" />
<remove fileExtension=".eot" />
<remove fileExtension=".woff" />
<remove fileExtension=".otf" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" />
<mimeMap fileExtension=".woff" mimeType="application/x-woff" />
<mimeMap fileExtension=".otf" mimeType="font/otf" />
</staticContent>
</system.webServer>
它在 Firefox 上运行良好,但在 Chrome 上运行不佳。我在我的项目中尝试了“字体文件夹方法”和“ttf 字体”,但它没有改变。
我怀疑 woff 文件,但我无法更改它。
我怎样才能解决这个问题?