[英]Why this CSS font-face code does not load the font?
I have the written the following code in CSS for it to load the fonts. 我在CSS中编写了以下代码来加载字体。 The path are double checked, they are fine, but I do not know why it does not load them up.
路径是双重检查,它们很好,但我不知道它为什么不加载它们。 it worked until quite several days ago.
它工作到几天前。 Now, it does not work.
现在,它不起作用。 Here is the written code:
这是书面代码:
@font-face {
font-family: 'yekan';
src: url('fonts/WebYekan.eot?#') format('eot'),
url('fonts/WebYekan.ttf') format('eot'),
url('fonts/WebYekan.woff') format('truetype');
}
Solution: 解:
You were referencing the wrong format to the wrong font files. 您将错误的格式引用到错误的字体文件。 Fixed it below:
修正如下:
@font-face {
font-family: 'yekan';
src: url('fonts/WebYekan.eot?#') format('eot'),
url('fonts/WebYekan.ttf') format('truetype'),
url('fonts/WebYekan.woff') format('woff');
} }
this may work 这可能有用
@font-face {
font-family: 'yekan';
src: url('fonts/WebYekan.eot?#') format('eot'),
url('fonts/WebYekan.ttf') format('truetype'),
url('fonts/WebYekan.woff') format('woff');
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.