font-family

範例碼

/* Noto Sans TC */
@import url('https://fonts.googleapis.com/css?family=Noto+Sans+TC');

/* 楷體 (cwTeXKai) */
@import url('https://fonts.googleapis.com/earlyaccess/cwtexkai.css');

/* 圓體 (cwTeXYen) */
@import url('https://fonts.googleapis.com/earlyaccess/cwtexyen.css');

/* 仿宋體 (cwTeXFangSong) */
@import url('https://fonts.googleapis.com/earlyaccess/cwtexfangsong.css');

/* 明體 (cwTeXMing) */
@import url('https://fonts.googleapis.com/earlyaccess/cwtexming.css');

p {
    font-size: 2rem;
}

.noto {
    font-family: "Noto Sans TC", sans-serif;
}

.kai {
    font-family: "cwTeXKai", sans-serif;
}

.yen {
    font-family: "cwTeXYen", sans-serif;
}

.song {
    font-family: "cwTeXFangSong", sans-serif;
}

.ming {
    font-family: "cwTeXMing", sans-serif;
}

/* ⭐️ 中英文夾雜 */
/*    只要英文字體放前面、中文字體放後面就可以。 */
.mixed {
    font-family: "Times New Roman", "cwTeXFangSong", serif;
}

參考

Last updated