使用CSS定位语言 [英] Use CSS to target a language

查看:133
本文介绍了使用CSS定位语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网页中只设置较大的汉字,并使英文字母保持不变,因为不知何故,汉字显得比英文字符大得多。

I want to set only the Chinese characters to be larger in a web page and make the English letters stay the same, because somehow the Chinese characters appear much larger than the English characters.

这是可能吗?感谢。

推荐答案

不能将中文字符包裹到元素中,例如< span lang = zh> ...< / span> (您可以使用:lang(zh){...} )。

It is not possible without wrapping the Chinese characters into elements, like <span lang=zh>...</span> (for which you could then use :lang(zh) { ... }).

另一方面,如果中文和英文字符大小不同,则可能是由于使用了风格不兼容的字体。如果您设置了只是 font-family:Arial ,那么根据浏览器默认值,英文字符将以Arial和其他字体出现,因为Arial不包含中文字符。然后解决方案是使用一个 font-family 值,其中只包含具有中文字符(可接受的样式)的字体。

On the other hand, if Chinese and English characters look too different in size, it is probably caused by the use of stylistically incompatible fonts. If you set e.g. just font-family: Arial, then English characters will appear in Arial and Chinese character in some other font, depending on browser defaults, because Arial does not contain Chinese characters. Then the solution would be to use a font-family value that contains only such fonts that have Chinese characters (in acceptable style).

这篇关于使用CSS定位语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆