<table>
  <tr>
    <td>foo</td>
    <td>bar</td>
    <td>hoge</td>
  </tr>
  <tr>
    <td>foo</td>
    <td>bar</td>
    <td>hoge</td>
  </tr>
  <tr>
    <td>foo</td>
    <td>bar</td>
    <td>hoge</td>
  </tr>
  <tr>
    <td>foo</td>
    <td>bar</td>
    <td>hoge</td>
  </tr>
</table>
body {
  counter-reset: row-counter;
}

table {
  border-collapse: collapse;
}

table tr th,
table tr td {
  border: 1px solid #ddd;
  padding: 10px 20px;
}

tr {
  position: relative;
}

tr:before {
  position: relative;
  padding: 10px;
  display: block;
  bottom: 0;
  counter-increment: row-counter;
  content: "第"counter(row-counter)"行目";
}
Rerun