【发布时间】:2019-11-18 10:38:44
【问题描述】:
是否可以获取用户的写作模式?我想知道文本是 RTL 还是 LTR 和 TB。
看来我可以从 computedValue 中得到方向和书写模式。
#div2 {
writing-mode: vertical-lr;
}
#div1 {
direction: rtl;
}
p {
background-color: #FFEECC;
}
<p>While the characters in most scripts are written from left to right, certain scripts are written from right to left.</p>
<p id="div1">While the characters in most scripts are written from left to right, certain scripts are written from right to left. In some documents, in particular those written with the Arabic or Hebrew script, and in some mixed-language contexts, text in a single (visually displayed) block may appear with mixed directionality. This phenomenon is called bidirectionality, or "bidi" for short.</p>
<p id="div2">While the characters in most scripts are written from left to right, certain scripts are written from right to left. I</p>
或者是否有推荐的方法来获取此信息,例如 IME 模式?
获得方向和写作模式或语言是否是表示考虑其他语言的方式?
【问题讨论】:
标签: javascript html css ime