HTML/Font/Fallback

来自康健生活
Kangkk​(留言 | 贡献)2023年3月17日 (五) 10:24的版本 (创建页面,内容为“== Fallback == <blockquote><pre> (hasFont && isInUnicodeTable) ? 'Current Font' : 'Next Font'</pre></blockquote> 国际化的站点设置多语种的字体: <syntaxhighlight lang="css"> [lang="ja"] body{ font-family:"ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro","メイリオ",Meiryo,Osaka,"MS Pゴシック","MS PGothic","MS Gothic”, "MS ゴシック","Helvetica Neue”,Helvetica,Arial, sans-serif !important } [lang="ko"] body{…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

Fallback

(hasFont && isInUnicodeTable) ? 'Current Font' : 'Next Font'

国际化的站点设置多语种的字体:

[lang="ja"] body{
    font-family:"ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro","メイリオ",Meiryo,Osaka,"MS Pゴシック","MS PGothic","MS Gothic”,
    "MS ゴシック","Helvetica Neue”,Helvetica,Arial,
    sans-serif !important
}
[lang="ko"] body{
    font-family:"나눔 고딕","Nanum Gothic","맑은 고딕","Malgun Gothic”,
    "Apple Gothic","돋움",Dotum,"Helvetica Neue”,Helvetica,
    Arial,sans-serif !important
}
[lang^="zh"] body{
    font-family:"Hiragino Sans GB”,"华文细黑","STHeiti","微软雅黑",
    "Microsoft YaHei",SimHei,"Helvetica Neue”,Helvetica,Arial,
    sans-serif !important
}