使用< hr>标签与表? [英] Using an <hr> tag with a table?

查看:89
本文介绍了使用< hr>标签与表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个边框在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;
}

这篇关于使用&lt; hr&gt;标签与表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆