如何使用谷歌字體

國內網站使用谷歌字體是不方便的,解決辦法以下
html

一、將谷歌的地址換成360的api

http://fonts.googleapis.com 換成 http://fonts.useso.com 字體

二、只作了第一步仍是有問題的,會報錯:網站

No 'Access-Control-Allow-Origin' header is present on the requested resourceui

解決辦法是給html頁面添加頭信息google

<meta http-equiv="Access-Control-Allow-Origin" content="*">spa

相關文章
相關標籤/搜索