CSS- table 序列号自动排序

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;

}

你可能感兴趣的:(css/css3)