从右到左的显示风格错误地显示括号 [英] brackets displays wrongly for right to left display style

查看:100
本文介绍了从右到左的显示风格错误地显示括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

html代码

The html code

<html dir="rtl">
<p>hello (world)</p>
</html>

您将看到如下所示的页面:

you will see a page like this:

(hello (world

但是,如果我更改了html代码转换为

However,if I change the html code into

<html dir="rtl">
<p>hello (world) again</p>
</html>

然后文本正常显示:

 hello (world) again

任何人都可以解释为什么发生这种情况?
如何解决第一个例子?

Anyone can explain why this happens? How to fix the first example?

我的浏览器是chrome

My browser is chrome

推荐答案

您只需要在最后一个括号后添加LRM字符。

You just need to add the LRM character after the last bracket. HTML entity: &#x200E;

<html dir="rtl">
<body>
<p>hello (world)&#x200E;</p>
</body></html>

这告诉浏览器将括号解释为从左到右读数。

This tells the browser to interpret the brackets as left-to-right reading.

这篇关于从右到左的显示风格错误地显示括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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