使用< hr>标签与表? [英] Using an <hr> tag with a table?
问题描述
我有一个边框在CSS中设置为none的表格。不过,我想在桌子上放一条水平线来分隔每一行。
我已经尝试在< td>之间放置
标签,但是它会打印出每一列之间有一个小空格的水平黑线。 < hr>
< / td>
任何使用不同方法在表格内打印水平线的方法?
我建议放: < tr style =border-bottom:1px solid#000;>
在你想要的行的每一行上。您也可以为每个单元格单独执行此操作。
更新
建议使用一个css类,如果可以的话,建议使用单独的样式表。例如
< tr class =bordered>< / tr>
tr.bordered {
border-bottom:1px solid#000;
}
I have a table with borders that are set to "none" in CSS. However, I want to put a horizontal line separating each row on the table.
I have tried placing <hr>
tags in between each <td> </td>
tag for a particular row, but it prints a horizontal black line with small white spaces between each column.
Is there any way to print a horizontal line within a table using a different method?
I'd suggest putting:
<tr style="border-bottom: 1px solid #000;">
on every row you want the line to be on. You can also do this individually for each cell.
Update
Id recommend using a css class and a have a separate stylesheet if you can. For example
<tr class="bordered"></tr>
tr.bordered {
border-bottom: 1px solid #000;
}
这篇关于使用< hr>标签与表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!