我在仪表板上有很多表,我在仪表板上也有 fullCalender
(fullCalender
使用 UI 上的表)。我只需要在特定表格的第一列中有序列号,它可以通过 id
或 class
来识别,
<style>
table { counter-reset: Serial; }
table { border-collapse: separate; }
tr td:first-child:before { counter-increment: Serial; content: counter(Serial).; }
</style>
但它为 UI 上存在的所有表格提供序列号,包括 fullCalender
。为了支持下面的问题是图片。
最佳答案
我使用下面的 CSS 代码完成了它,
<style>
.serialTable { counter-reset: Serial; }
.serialTable { border-collapse: separate; }
.serialTable tr td:first-child:before { counter-increment: Serial; content: counter(Serial); }
</style>
然后我添加了类serialTable
到所需的表格 <table class="serialTable"></table>
关于javascript - 如何仅将序列号添加到特定表格的第一列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46807391/