[轉貼]CSS字體加載跨域問題-如何解決設定.htaccess檔

.htaccess

 
#解決css加載字體跨域問題此招對自己架設主機者有效
<FilesMatch "\.(ttf|otf|eot|woff|woff2)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>

AddType application/vnd.ms-fontobject .eot 
AddType application/x-font-ttf .ttf 
AddType application/vnd.ms-fontobject .eot 
AddType application/x-font-ttf .ttf 
AddType application/x-font-opentype .otf 
AddType application/x-font-woff .woff 
AddType application/x-font-woff2 .woff2 
AddType image/svg+xml .svg 
 


閱讀全文〈[轉貼]CSS字體加載跨域問題-如何解決設定.htaccess檔〉