我有这个
HTML:
<body style="direction: rtl"> <div style="display:inline-block"> <span>x:</span> <span>1</span>,<span>y:</span> <span>2</span> | <a>link1</a> | </div> <a>link2</a> </body>
方向:ltr显示:
x: 1,y: 2 | link1 | link2
但当我将其更改为rtl时显示:
link2 | x: 1,y: 2 | link1
虽然我希望:
link2 | link1 | 2 :y,1 :x
解决方法
试试这个:
<body style="direction: rtl"> <div style="display:inline-block"> <span dir="rtl">x:</span> <span dir="rtl">1</span>,<span dir="rtl">y:</span> <span dir="rtl">2</span> | <a>link1</a> | </div> <a>link2</a> </body>
这给了我你想要的东西.
有用的链接:http://www.i18nguy.com/markup/right-to-left.html和http://www.w3.org/TR/html401/struct/dirlang.html