为IE10制作特定的CSS代码

Sev*_*var 5 html javascript css web

我为我的网站绑定了一些类型:

@font-face {
font-family:WILLS;
src:url(WILLS.TTF);
}
Run Code Online (Sandbox Code Playgroud)

在大多数浏览器中,此类型可以完美识别,但由于ttf扩展,IE不会看到此类型.但问题是IE10 +不支持这种情况.

<!--[if IE]>...<![endif]-->

是否有任何方法可以为IE10制作具体的css代码,以便将类型更改为usuall,例如Tahoma或者时间和当前更改字体大小?

Lia*_*sby 6

You will need to specify a EOT file for IE9+ and a TTF file for <= IE8

@font-face {
font-family:WILLS,
src:url(WILLS.TTF),
url(WILLS.EOT); /* IE9+ */
}
Run Code Online (Sandbox Code Playgroud)

If you convert the TTF file to an EOT file and upload both files. IE9 and above will use the EOT file


sg3*_*g3s 1

我建议你研究一下网络字体生成器。它将为您提供支持 IE10 所需的字体类型,并生成确保最佳跨平台支持的 CSS 代码。

Squirrel 字体是最常用/最受欢迎的字体,但还有更多

http://www.fontsquirrel.com/tools/webfont-generator