这是我的代码
@font-face {
font-family: 'WebSymbolsRegular';
src: url('websymbols-regular-webfont.eot');
src: url('websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('websymbols-regular-webfont.woff') format('woff'),
url('websymbols-regular-webfont.ttf') format('truetype'),
url('websymbols-regular-webfont.otf') format('opentype'),
url('websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
font-weight: normal;
font-style: normal;
}
这是我的头文件
<link rel="stylesheet" href="css/fontstylesheet.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
答案 0 :(得分:0)
检查字体文件路径。如果你把字体放在单独的字体文件夹外面,css文件夹意味着提到了css中的字体包路径并尝试它工作正常..
@font-face {
font-family: 'WebSymbolsRegular';
src: url('../fonts/websymbols-regular-webfont.eot');
src: url('../fonts/websymbols-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/websymbols-regular-webfont.woff') format('woff'),
url('../fonts/websymbols-regular-webfont.ttf') format('truetype'),
url('../fonts/websymbols-regular-webfont.otf') format('opentype'),
url('../fonts/websymbols-regular-webfont.svg#WebSymbolsRegular') format('svg');
font-weight: normal;
font-style: normal;
}