Hebrew Ordered List letters are reversed

↘锁芯ラ 提交于 2019-12-24 14:37:36

问题


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>

http://jsfiddle.net/0zqcerhg/

For example, the 10th item, instead of יא is written אי, which is wrong. this is true for 12th, 13, 14 and so on...


回答1:


This isn't an 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; 
}
<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/0zqcerhg/6/

Thanks to @RC. for his answer (Custom <ol> numbering with Hebrew numerals)



来源:https://stackoverflow.com/questions/28831390/hebrew-ordered-list-letters-are-reversed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!