css边框未应用于表tr

时间:2014-07-04 17:25:24

标签: html css css3 border css-tables

这是jsfiddle

http://jsfiddle.net/r323e/

非常简单:

我想在表tr上放一个边框,所以我尝试了这个:

.table tr{
    height: 30px;
    border-bottom: 10px solid #000000;
}

已应用height属性但边框不是。

为什么好吗?以及如何解决它。

非常感谢

2 个答案:

答案 0 :(得分:3)

display:block添加到您的tr样式。

.table tr{
display:block;
height: 30px;
border-bottom: 10px solid #000000;
}

答案 1 :(得分:2)

你可以像这样定义一个tr类css

<tr class="border_bottom">

在你的CSS中你可以做到这一点

tr.border_bottom td {
  border-bottom:1pt solid black;
}

在你的代码中尝试并且工作......祝你好运!