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