更换 CDN
This commit is contained in:
parent
9d7f369f61
commit
9805f64da6
@ -9,18 +9,21 @@ GitHub:https://github.com/imsyy/home
|
||||
|
||||
@font-face {
|
||||
font-family: "MiSans";
|
||||
src: url('../font/MiSans-Regular.subset.woff2') format('woff2');
|
||||
src: url('../font/MiSans-Regular.subset.ttf') format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url('https://s-bj-2127-file.oss.dogecdn.com/font/MiSans-Regular.subset.woff2') format('woff2');
|
||||
/* src: url('https://s-bj-2127-file.oss.dogecdn.com/font/MiSans-Regular.subset.ttf') format('truetype'); */
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Pacifico-Regular";
|
||||
src: url('../font/Pacifico-Regular.ttf') format('truetype');
|
||||
src: url('https://s-bj-2127-file.oss.dogecdn.com/font/Pacifico-Regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "UnidreamLED";
|
||||
src: url('../font/UnidreamLED.ttf') format('truetype');
|
||||
src: url('https://s-bj-2127-file.oss.dogecdn.com/font/UnidreamLED.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/*全局样式*/
|
||||
|
@ -47,12 +47,12 @@ window.addEventListener('load', function () {
|
||||
element.src = "./js/music.js";
|
||||
document.body.appendChild(element);
|
||||
|
||||
//中文字体缓加载
|
||||
//中文字体缓加载-此处写入字体源文件
|
||||
//先行加载简体中文子集,后续补全字集
|
||||
//由于压缩过后的中文字体仍旧过大,可转移至对象储存或 CDN 加载
|
||||
//由于压缩过后的中文字体仍旧过大,可转移至对象存储或 CDN 加载
|
||||
const font = new FontFace(
|
||||
"MiSans",
|
||||
"url(" + "../font/MiSans-Regular.woff2" + ")"
|
||||
"url(" + "./font/MiSans-Regular.woff2" + ")"
|
||||
);
|
||||
document.fonts.add(font);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user