首页 > 关于三种空格转义字符的宽度?

关于三种空格转义字符的宽度?

我先上两张图片大家看一下。

(原文地址:http://114.xixik.com/character/)
第二张图是我本地代码:

图上完了,该说事了、
我之前项目中写代码,一直用 来当空格用,今天看到了两个新东西,  ,看上文中解释说是「半方大」和「全方大」,就不是很了解,所以写了几行代码做了比较,发现这两个之前很好对比,就是0.5和1的关系,可疑问又来了, 又是多大呢。
我初以为, 是0.25的大小,后来多行代码一比较,发现,不并如我所意淫的。
 在上文中的解释是「不断行的空白格」,我又意淫了,以为就是一个空格键的大小。可当我试验时发现,2个 加一个空格,和3个 的大小还不一样。
好奇怪啊。
不会的东西突然好多,还希望大神来帮我解答一下上面的问题。
麻烦啦各路大神!


&nbsp大小是不确定的 找到一个例子,可以参考这个 http://jsfiddle.net/nivas/CV5mQ/

至于其他2个 参考 https://www.w3.org/MarkUp/html3/specialchars.html

The character entities   and   denote an en space and an em space respectively, where an en space is half the point size and an em space is equal to the point size of the current font. For fixed pitch fonts, the user agent can treat the en space as being equivalent to a single space character, and the em space as being equuivalent to two space characters.

【热门文章】
【热门文章】