我正在尝试使用自定义字体并利用了我所知道的所有内容(包括 ?#iefix),它在除 IE8 和 IE7 之外的所有浏览器上都运行良好。我将其简化为最基本的内容,但仍然看到了问题。
这是 HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>This is a test.</h1>
</body>
</html>
CSS在这里:
@charset "utf-8";
/* CSS Document */
@font-face {
    font-family: 'swz721kc';
    src: url('fonts/swz721kc.eot');
    src: url('fonts/swz721kc.eot?#iefix') format('embedded-opentype'),
         url('fonts/swz721kc.woff') format('woff'),
         url('fonts/swz721kc.ttf') format('truetype'),
         url('fonts/swz721kc.svg#swz721kc') format('svg');
    font-weight: normal;
    font-style: normal;
}
h1 {
    font-family: 'swz721kc';
    font-size: 42px;
    color: #000;
    font-weight: normal;
    margin: 30px 0 0 0;
    padding: 0;
}