Сергей Asked:2020-07-18 15:22:38 +0000 UTC2020-07-18 15:22:38 +0000 UTC 2020-07-18 15:22:38 +0000 UTC 如何拉伸表格中的单元格 772 有一个表格,它有 3 列,左边是文本,右边是文本,在它们之间有一个空列,其中画了一条带边框的线,或者虚线,如果没有严格指定尺寸,我怎样才能让它可见?毕竟文本的长度可以不同。 html 1 个回答 Voted Best Answer soledar10 2020-07-18T16:04:23Z2020-07-18T16:04:23Z *{ padding: 0; margin: 0; box-sizing: border-box; } table{ width: 100%; border-collapse: collapse; } td:first-child, td:last-child{ white-space: nowrap; } td:first-child{ text-align: left; } td:last-child{ text-align: right; } td:nth-child(2){ width: 100%; border-bottom: 1px dashed #ccc; } <table> <tr> <td>Левый текст</td> <td></td> <td>Правый текст</td> </tr> </table>
1 个回答