引用没效果,麻烦老师看下哪里出问题
来源:2-8 @font-face 获取特殊字体
Qua
2019-08-22 17:58:07
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>自定义字体引用</title>
<style>
@font-face {
font-family: 'myfont';
src: url('font/myfont.eot');
src: url('font/myfont.eot?#iefix') format('embedded-opentype'),
url('font/myfont.woff2') format('woff2'),
url('font/myfont.woff') format('woff'),
url('font/myfont.svg#uploaded_fileregular') format('svg');
font-weight: normal;
font-style: normal;
}
h1{
font-family: 'myfont';
}
</style>
</head>
<body>
<h1>欢迎来到慕课网!</h1>
</body>
</html>
1回答
同学你好!
是不使用woff2格式的,使用ttf的:
效果:
如果帮助到了你,欢迎采纳,祝学习愉快~
相似问题
回答 1
回答 2