CSS- table 序列号自动排序

xiaoxiao2021-02-28  60

HTML:

<table> <thead> <tr> <th>序号</th> </tr> </thead> <tbody> <tr> <td class="SortCLASS"></td> </tr> </tbody> </table>

CSS:

tbody { counter-reset:sectioncounter; } .SortCLASS:before { content:counter(sectioncounter); counter-increment:sectioncounter; }
转载请注明原文地址: https://www.6miu.com/read-2626496.html

最新回复(0)