为什么“[x] y”在RTL方向上显示不正确? [英] Why does "[x]y" display incorrectly in the RTL direction?
问题描述
< div style =direction:rtl> [x] y< / div>
$ b 您可以看到HTML文本 [x] y $ c $
显示为 x] y]
。
结果的原因是什么?
PS:我在Chrome 56.0.2924.87(64位)中得到这个结果。
<它是正确渲染,即根据规格。您已要求从右至左布局。渲染首先使用 [
字符。它是方向中性的,因此呈现在RTL最右边并且被镜像(因此它看起来像]
)。接下来,它的左边是 x] y
,因为拉丁字母 x
和 y
具有固有的从左到右的方向性,并且中立的]
从它们的方向获得它的方向性。
要得出的结论取决于你想要的渲染和你使用从右向左的方向性的原因。
<div style="direction: rtl">
[x]y
</div>
You can see HTML text [x]y
displays as x]y]
.
What is the reason of that result?
PS: I get that result in Chrome 56.0.2924.87 (64-bit).
It is rendered correctly, i.e. according to specifications. You have asked for right-to-left layout. The rendering first takes the [
character. It is directionally neutral and therefore rendered in a RTL run rightmost and mirrored (so it looks like ]
). Next, to the left of it comes x]y
in that order, since the Latin letters x
and y
have inherent left-to-right directionality and the neutral ]
gets its directionality from them.
The conclusions to be drawn depends on the rendering you want and your reasons for using right-to-left directionality.
这篇关于为什么“[x] y”在RTL方向上显示不正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!