我写了一些HTML/CSS
代码,在Chrome
上显示以下图像
为什么不存在(⯇和and)之间以及(┃和◆)之间的空格(请参见yellow
unicode)?
为什么,当<span>
中的所有<span class='char'>
都在同一行中时,所有的空间分隔都是可见的(请参见green
unicode)?
区别仅在于HTML代码在文件中的写入方式,仅此而已! CSS代码完全相同(仅更改了背景色)。
为了便于分析yellow
情况,我放置了第三个具有更多颜色的块。
HTML/CSS
代码如下
body { font-family: Arial; font-size:20px; } div.error span.char { font-size:40px; background-color: yellow; } div.ok span.char { font-size:40px; background-color: lightgreen; } div.color > span.char { font-size:40px; background-color: orange; } div.color > span.char > span.bar { font-size:40px; background-color: cyan; } div.color > span.char > span.triangle { font-size:40px; background-color: lightgrey; }
NO SPACE-SEPARATOR<br> between (⯇ ⯇) and between (┃◆) <div class='error'> <span class='char'> <span class='bar'>┃</span> <span class='triangle'>⯇</span> </span> <span class='char'>⯇</span> <span class='char'>⯈</span> <span class='char'> <span class='triangle'>⯈</span> <span class='bar'>┃</span> </span> <span class='char'>◆</span> </div> SPACE-SEPARATOR<br> between all <span class='char'> <div class='ok'> <span class='char'><span class='bar'>┃</span><span class='triangle'>⯇</span></span> <span class='char'>⯇</span> <span class='char'>⯈</span> <span class='char'><span class='triangle'>⯈</span><span class='bar'>┃</span></span> <span class='char'>◆</span> </div> NO SPACE-SEPARATOR with colors <div class='color'> <span class='char'> <span class='bar'>┃</span> <span class='triangle'>⯇</span> </span> <span class='char'>⯇</span> <span class='char'>⯈</span> <span class='char'> <span class='triangle'>⯈</span> <span class='bar'>┃</span> </span> <span class='char'>◆</span> </div>
我写了一些HTML / CSS代码,在Chrome上显示以下图像,为什么(⯇和⯇)之间以及(┃和◆)之间不存在空间分隔(请参见黄色...