我很难得到这@ @ font-face字体替换工作crossbrowser请你帮忙。它可以工作在所有,但即9或全部工作,但即7和ie 8.@ font-face字体替换工作crossbrowser
我有一个.eot .otf .svg字体。 ttf .woff?
感谢
/* works in all but ie 9 */
@font-face {
font-family: 'Deutsch';
src: url('/fonts/Deutsch.eot');
src: local('/fonts/Deutsch'),
url('/fonts/Deutsch.ttf') format('truetype'),
url('/fonts/Deutsch.svg#font') format('svg');
}
/*from [http://blog.themeforest.net/tutorials/how-to-achieve-cross-browser-font-face-support/][1] */
/* works in all but ie 7 and ie 8 */
@font-face {
font-family: 'Deutsch';
src: url('/fonts/Deutsch.ttf'),
url('/fonts/Deutsch.eot'); /* IE9+ */
}
/*from [http://w3schools.com/css3/css3_fonts.asp][2]*/
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
/* code place holder location for css */
#test
{
font-family:'Deutsch';
font-weight:bold;
text-decoration:underline;
font-style:italic;
font-size:30px;
}
</style>
</head>
<body>
<div id="test">text goes here</div>
</body>
</html>
更改您的文档类型........在您的html中删除此行xmlns =“http://www.w3.org/1999/xhtml” – 2013-03-22 07:26:21
仍然无效 – 2013-03-22 07:28:03
检查此链接.. http: //reference.sitepoint.com/css/at-fontface 它显示字体的兼容性 – oscprofessionals 2013-03-22 07:45:16