自定义字体未在IE中加载

时间:2014-02-25 13:05:45

标签: html css .htaccess

尝试在IE上加载自定义字体。

CSS

@font-face {
font-family: 'HelveticaNeueLTCom47LightCondensed';
src: url('../font/helveticaneueltcom-ltcn.eot');
src: url('../font/helveticaneueltcom-ltcn.eot?#iefix') format('embedded-opentype'),
url('../font/helveticaneueltcom-ltcn.woff') format('woff'),
url('../font/helveticaneueltcom-ltcn.ttf') format('truetype'),
url('../font/helveticaneueltcom-ltcn.svg#HelveticaNeueLTCom47LightCondensed')   format('svg');
}

body {
color: #393A3D;
line-height: 1.5;
font-family: HelveticaNeueLTCom47LightCondensed, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased; }

的.htaccess

<FilesMatch "\.(ttf|otf|eot|woff)$">
  <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "http://medomain.com"
  </IfModule>
</FilesMatch>

1 个答案:

答案 0 :(得分:-1)

font-family: HelveticaNeueLTCom47LightCondensed, Helvetica, Arial, sans-serif;

替换为:

font-family: 'HelveticaNeueLTCom47LightCondensed', Helvetica, Arial, sans-serif;