gpt4 book ai didi

html - 希伯来语有序列表字母被颠倒

转载 作者:行者123 更新时间:2023-11-28 17:14:15 26 4
gpt4 key购买 nike

我在处理 OL 和希伯来文字母时遇到了问题。尝试使用希伯来字母创建有序列表 ( <ol> ) 时,当涉及到高于十个元素时,字母会反转。正如你在这里看到的( Chrome ):

<ol style="list-style-type: hebrew; direction: rtl; text-align: right;">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li style="direction: rtl; list-style-type: hebrew;">14</li>
</ol>

http://jsfiddle.net/0zqcerhg/

例如,第10项,把יא写成了אי,这是错误的。对于第 12、13、14 等等都是如此......

最佳答案

这不是“官方”答案,而是使用不同解决方案获得相同结果的技巧。

ol {
counter-reset: num;
direction: rtl;
}
li {
list-style-type: none;
counter-increment: num;
padding-bottom: 4px;
}

li:before {
content: '.' counter(num, hebrew);
padding-left: 10px;
unicode-bidi: bidi-override;
direction: ltr;
float: right;
}
<ol style="list-style-type: hebrew; direction: rtl;">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
</ol>

http://jsfiddle.net/moshfeu/pchady8e/1/

感谢@RC。他的回答 ( Custom <ol> numbering with Hebrew numerals )

关于html - 希伯来语有序列表字母被颠倒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28831390/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com