san*_*zer 18 css internet-explorer font-face
我正在尝试在我正在使用的网站上使用Green Pillow和Cotidiana字体.我已经使用@ font-face加载了.eot文件,但它仍然没有工作......
真的不确定我在这里做错了什么:
@font-face {
font-family: "link_font";
src: url( "Greenpiloww.eot" ); /* IE */
src: local("GreenPillow"), url( "GREENPIL.otf" ) format("truetype"); /* non-IE */
}
@font-face {
font-family: "twitter_font";
src: url( "Cotidiana.eot" ); /* IE */
src: local("Cotidiana"), url( "Cotidiana.ttf" ) format("truetype"); /* non-IE */
}
Run Code Online (Sandbox Code Playgroud)
Int*_*ang 28
您可以尝试以下语法,称为防弹font-face语法:
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?#iefix') format('embedded-opentype'),
url('myfont-webfont.woff') format('woff'),
url('myfont-webfont.ttf') format('truetype'),
url('myfont-webfont.svg#svgFontName') format('svg');
}
Run Code Online (Sandbox Code Playgroud)
显然.eot字体后面的查询字符串帮助IE不会窒息.如果您没有.svg或.woff版本的字体,只需删除这些行.