希伯来语有序列表字母相反

时间:2015-03-03 12:04:21

标签: html css google-chrome html-lists

我在OL和希伯来字母上遇到麻烦。 当尝试使用希伯来字母创建有序列表(<ol>)时,当涉及高于10个项目时,字母会反转。正如你在这里看到的那样(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等都是如此......

1 个答案:

答案 0 :(得分:1)

这不是一个答案,而是通过不同的解决方案获得相同结果的技巧。

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/

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

相关问题