老师我的只能体现ttf格式,其余格式体现不出来为什么?
来源:2-8 @font-face 获取特殊字体
慕前端4396110
2019-04-25 11:50:41
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
@font-face {
font-family: 'myfont';
src: url('font/myfont.eot');
src: url('font/myfont.eot?#iefix') format('embedded-opentype'),
url('font/myfont.ttf') format('truetype'),
url('font/myfont.woff2') format('woff2'),
url('font/myfont.woff') format('woff'),
url('font/myfont.svg#myfont') format('svg');
font-weight: normal;
font-style: normal;
}
h1{
font-family:myfont;
}
</style>
</head>
<body>
<h1>我爱你就像老鼠爱大米</h1>
</body>
</html>
用IE浏览器体现不出来字体,或者注释掉ttf格式也体现不出来。
1回答
一路电光带火花
2019-04-25
兄弟~
这个字体格式是只有一种的,只有毛泽东体~
但是测试了一下,确实IE浏览器没有这个效果,应该是因为浏览器不兼容吧。
不过以后也用不到特殊字体,使用特殊字体在盈利的页面上是要花钱买的....
相似问题