以下代码有问题吗?:
当我在网页中加载此字体时,字体不起作用。
@font-face {
font-family: 'yekan';
src: url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.eot');
src: url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.eot?#iefix') format('embedded-opentype'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.woff2') format('woff2'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.woff') format('woff'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.ttf') format('truetype'),
url('http://yekandroidi.persiangig.com/other/ip-address/fonts/byekan-webfont.svg#yekan') format('svg');
font-weight: normal;
font-style: normal;
}
p {
font-family: yekan; /*nothing appear*/
}
答案 0 :(得分:1)
在服务器上启用CORS,或使用其他URL访问字体