我正在尝试自动对表格中的行进行编号,我可以使用以下命令来执行此操作:
/* Set the Serial counter to 0 */
{ counter-reset: Serial; }
/* Set the serial number counter to 0 */
.css-serial {
counter-reset: serial-number; }
/* Increment the serial number counter */
.css-serial td:first-child:before {
counter-increment: serial-number;
/* Display the counter */
content: counter(serial-number); }
<a href="http://www.phoenixcomm.net/~harrison/tmp/questions/Code1.207-05-16.html">My table code</a><br>
<img src="https://i.stack.imgur.com/NNL2n.png"></a><br>这就像冠军一样工作,但当它到达我的一个分隔符时,我有一个小问题。如项目#7,#10所示。我如何阻止它对分隔符进行编号?
<tr><_td colspan=2><HR 30%></td></tr> 发布于 2017-05-17 09:26:05
只是猜测,因为上面的信息是不完整的,我假设下划线是一个拼写错误,但是
.css-serial td:not([colspan="2"]):first-child::before {
counter-increment: serial-number;
content: counter(serial-number);
}https://stackoverflow.com/questions/44013523
复制相似问题