簡體   English   中英

CSS-@ font-face

[英]CSS - @font-face

下面的代碼有什么問題嗎?

當我在網頁上加載此字體時,該字體不起作用。

@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*/
}

跨源資源共享策略已阻止從源站點' http://yekandroidi.persiangig.com '加載字體:所請求的資源上沒有'Access-Control-Allow-Origin'標頭

在服務器上啟用CORS,或使用其他URL訪問字體

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM