希伯来语有序列表字母相反 [英] Hebrew Ordered List letters are reversed
问题描述
我在使用OL和希伯来字母时遇到了麻烦.
尝试创建带有希伯来字母的有序列表(<ol>
)时,如果涉及到十个以上的项目,则字母会颠倒.如您所见(铬):
<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>
例如,第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.以获得答案(使用希伯来语数字自定义< ol> )
I am having trouble with OL and hebrew letters.
When trying to create an ordered list (<ol>
) with hebrew letters, when it comes to higher than ten items, the letters are reversed. As you can see here (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>
For example, the 10th item, instead of יא is written אי, which is wrong. this is true for 12th, 13, 14 and so on...
This isn't an "official" answer but a trick to get the same result with a different solution.
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/
Thanks to @RC. for his answer (Custom <ol> numbering with Hebrew numerals)
这篇关于希伯来语有序列表字母相反的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!