导出数据时,<ol>不符合预期

时间:2017-11-03 03:07:41

标签: html css angularjs twitter-bootstrap

我使用下面的css代码在我的网页中显示有序列表。我已将内容导出到PDF,然后PDF中的有序列表显示不同,如下面的图像链接所示。

 ol {
    counter-reset: item;
}
ol li { display: block }

ol li:before {
content: counter(item) ". ";
counter-increment: item;
font-weight: bold;
}

Please click here to view the image of the exported ordered list

请检查工作演示:https://plnkr.co/edit/zz6ep51k9ZX1THDDZ8Gj?p=preview 单击导出按钮时,我们可以看到导出数据并生成PDF。在生成的PDF中,我们可以注意到有序列表没有正确显示。任何输入都会有所帮助。

1 个答案:

答案 0 :(得分:0)

enter image description here

ol{
  list-style: none;
}
@media print{
  ol{
    list-style: decimal;
  }
}
<ol>
<li>test1</li>

<li>test1</li>
<li>test1</li>

</ol>

相关问题