Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何修复带有数字的双向文本?_Html_Css_Bidirectional - Fatal编程技术网

Html 如何修复带有数字的双向文本?

Html 如何修复带有数字的双向文本?,html,css,bidirectional,Html,Css,Bidirectional,我得到了这个文本,我需要将其中的数字作为一个数字呈现 我尝试了几种方法来解决这个问题,使用css选择器中的unicode bidi,也使用了dir=“auto/rtl/ltr”,但没有解决任何问题。一种可能的解决方法是将电话号码(和类似文本)包装到一个单独的容器中,并在其上设置dir=“ltr”。例如: <span>אחד שני <span dir="ltr">+1(617) 522-22-33</span> אחד שני </span>

我得到了这个文本,我需要将其中的数字作为一个数字呈现


我尝试了几种方法来解决这个问题,使用css选择器中的unicode bidi,也使用了
dir=“auto/rtl/ltr”
,但没有解决任何问题。

一种可能的解决方法是将电话号码(和类似文本)包装到一个单独的容器中,并在其上设置
dir=“ltr”
。例如:

<span>אחד שני <span dir="ltr">+1(617) 522-22-33</span> אחד שני </span>
אחשני+1(617)522-22-33אחשני

根据内容的类型,您可以使用本例中的通用
,也可以使用更具体的元素。

您可以提供一些html和css代码,以便我们测试它吗?将手机包装在单独的span中,并在其上设置
dir=“ltr”
,如?双向算法是一团糟(虽然是有原因的)。@raina77ow解决了我的问题。请加上它作为答案