Skip to content

Instantly share code, notes, and snippets.

@amowu
Created July 3, 2016 08:18
Show Gist options
  • Select an option

  • Save amowu/ba5e6e18ec4ececbd1953e95d8f8aee4 to your computer and use it in GitHub Desktop.

Select an option

Save amowu/ba5e6e18ec4ececbd1953e95d8f8aee4 to your computer and use it in GitHub Desktop.
一個國際化的站點應該如何設置多語種的字體呢?其先後順序如何設定?這裏強烈推薦 Airbnb 作爲參考。
[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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment