开发者

Is there a way of only modifying Chinese characters through CSS (without affecting Roman characters)?

I noticed that Chinese characters tend to be a bit smaller in my website than Roman characters.

开发者_JAVA技巧

I would like to know if there's a way of modifying them through CSS without touching Roman characters.

For instance, assigning font-size to only Chinese characters.


You have basically two options:

  • Enforce server-side that all Chinese text, and only Chinese text, is wrapped in HTML elements labeled lang="zh". Then you can select them with :lang(zh) and apply a larger font-size.
  • Use @font-face to load a Chinese font whose metrics more closely match the Roman font you are using.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜