@ font-face在IE9中不起作用

Jin*_*ong 1 css internet-explorer-9

我有以下代码来为我的页面设置字体样式,但不知何故@ font-face在mozilla中工作但在IE中没有.有谁知道这里发生了什么,我该如何解决这个问题?

@font-face {
  font-family: 'TrashHand';
  src: url('../fonts/TrashHand.ttf');
  }

@font-face {
  font-family: 'BebasNeue';
  src: url('../fonts/BebasNeue.otf');
  }  


.tab_g 
{
    background:url(../images/ss_tab_0.png) no-repeat;
    width:176px;
    height:42px;
    font: 25px 'TrashHand',Arial, Helvetica, sans-serif;
    font-weight:50;
    text-transform:uppercase;
    color:#ffffff;
    padding-top:10px;
    text-align:center;
    margin-bottom:-15px;
}
Run Code Online (Sandbox Code Playgroud)

cer*_*eny 5

你应该检查像Font Squirrel这样的东西你可以上传你的字体,它会吐回相应的CSS.在所有浏览器中保证完美.另外,请查看Paul Irish的防弹@ font-face以获取有关该主题的更多信息.

它应该看起来像这样:

@font-face {
  font-family: 'Graublau Web';
  src: url('GraublauWeb.eot?') format('eot'), url('GraublauWeb.woff') format('woff'), url('GraublauWeb.ttf') format('truetype');
}
Run Code Online (Sandbox Code Playgroud)