自定义字体资源

字体格式 浏览器支持情况

font

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
@font-face {
  font-family: 'MaturaScriptCapitals';
  src: url("/fonts/MaturaMTScriptCapitals.ttf"); }

@font-face {
  font-family: 'iconfont';
  /* project id 861369 */
  src: url("//at.alicdn.com/t/font_861369_9voy0xmnmvl.eot");
  src: url("//at.alicdn.com/t/font_861369_9voy0xmnmvl.eot?#iefix") format("embedded-opentype"), url("//at.alicdn.com/t/font_861369_9voy0xmnmvl.woff") format("woff"), url("//at.alicdn.com/t/font_861369_9voy0xmnmvl.ttf") format("truetype"), url("//at.alicdn.com/t/font_861369_9voy0xmnmvl.svg#iconfont") format("svg"); }
  
  @font-face {
  font-family: 'HYYouYuanTiW';
  src: url("https://ali-1256045006.cos.ap-beijing.myqcloud.com/font/HYYouYuanTiW.ttf"); }

?? 站外字体 不可用? https://ali-1256045006.cos.ap-beijing.myqcloud.com/font/HYYouYuanTiW.ttf

1
2
Access to font at 'https://ali-1256045006.cos.ap-beijing.myqcloud.com/font/HYYouYuanTiW.ttf' from origin 'http://aliw.tk' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
aliw.tk/:1 GET https://ali-1256045006.cos.ap-beijing.myqcloud.com/font/HYYouYuanTiW.ttf net::ERR_FAILED

iconfont

兼容